From 9677aba91e9208dc84490bc460dacd693cf72417 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Mar 2021 20:39:46 +0100 Subject: [PATCH] python3Packages.txaio: update check part --- .../python-modules/txaio/default.nix | 51 ++++++++++++++----- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/txaio/default.nix b/pkgs/development/python-modules/txaio/default.nix index c2f2c9451bdc..fa219a94513d 100644 --- a/pkgs/development/python-modules/txaio/default.nix +++ b/pkgs/development/python-modules/txaio/default.nix @@ -1,30 +1,55 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, mock, six, twisted, isPy37, isPy27 }: +{ lib +, buildPythonPackage +, fetchPypi +, mock +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, six +, twisted +, zope_interface +}: buildPythonPackage rec { pname = "txaio"; version = "21.2.1"; - disabled = isPy27; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "7d6f89745680233f1c4db9ddb748df5e88d2a7a37962be174c0fd04c8dba1dc8"; + sha256 = "sha256-fW+JdFaAIz8cTbndt0jfXojSp6N5Yr4XTA/QTI26Hcg="; }; - checkInputs = [ pytest mock ]; + propagatedBuildInputs = [ + six + twisted + zope_interface + ]; - propagatedBuildInputs = [ six twisted ]; + checkInputs = [ + mock + pytest-asyncio + pytestCheckHook + ]; - checkPhase = '' - py.test -k "not test_sdist" - ''; + disabledTests = [ + # No real value + "test_sdist" + # Some tests seems out-dated and require additional data + "test_as_future" + "test_errback" + "test_create_future" + "test_callback" + "test_immediate_result" + "test_cancel" + ]; - # Needs some fixing - doCheck = false; + pythonImportsCheck = [ "txaio" ]; meta = with lib; { - description = "Utilities to support code that runs unmodified on Twisted and asyncio."; - homepage = "https://github.com/crossbario/txaio"; - license = licenses.mit; + description = "Utilities to support code that runs unmodified on Twisted and asyncio"; + homepage = "https://github.com/crossbario/txaio"; + license = licenses.mit; maintainers = with maintainers; [ nand0p ]; }; }