diff --git a/pkgs/development/python-modules/backports_functools_lru_cache/default.nix b/pkgs/development/python-modules/backports_functools_lru_cache/default.nix index 21920c32b4d2..680d23782f56 100644 --- a/pkgs/development/python-modules/backports_functools_lru_cache/default.nix +++ b/pkgs/development/python-modules/backports_functools_lru_cache/default.nix @@ -3,10 +3,7 @@ , fetchPypi , setuptools-scm , isPy3k -, pytest -, pytest-black -, pytest-flake8 -, pytest-cov +, pytestCheckHook }: buildPythonPackage rec { @@ -20,12 +17,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-scm ]; - checkInputs = [ pytest pytest-flake8 pytest-black pytest-cov ]; - # ironically, they fail a linting test, and pytest.ini forces that test suite - checkPhase = '' - rm backports/functools_lru_cache.py - pytest -k 'not format' - ''; + checkInputs = [ pytestCheckHook ]; # Test fail on Python 2 doCheck = isPy3k; diff --git a/pkgs/development/python-modules/portend/black-19.10b0.patch b/pkgs/development/python-modules/portend/black-19.10b0.patch deleted file mode 100644 index e781139e3192..000000000000 --- a/pkgs/development/python-modules/portend/black-19.10b0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/test_portend.py b/test_portend.py -index b2de8c2..3f90276 100644 ---- a/test_portend.py -+++ b/test_portend.py -@@ -21,7 +21,7 @@ def socket_infos(): - - - def id_for_info(info): -- af, = info[:1] -+ (af,) = info[:1] - return str(af) - - \ No newline at end of file diff --git a/pkgs/development/python-modules/portend/default.nix b/pkgs/development/python-modules/portend/default.nix index a3cb25624f7a..bf84e41610cb 100644 --- a/pkgs/development/python-modules/portend/default.nix +++ b/pkgs/development/python-modules/portend/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi -, pytest, setuptools-scm, tempora, pytest-black, pytest-cov }: +, pytestCheckHook, setuptools-scm, tempora }: buildPythonPackage rec { pname = "portend"; @@ -10,19 +10,11 @@ buildPythonPackage rec { sha256 = "239e3116045ea823f6df87d6168107ad75ccc0590e37242af0cc1e98c5d224e4"; }; - postPatch = '' - substituteInPlace pytest.ini --replace "--flake8" "" - ''; - nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ tempora ]; - checkInputs = [ pytest pytest-black pytest-cov ]; - - checkPhase = '' - py.test --deselect=test_portend.py::TestChecker::test_check_port_listening - ''; + checkInputs = [ pytestCheckHook ]; # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/tempora/default.nix b/pkgs/development/python-modules/tempora/default.nix index 6999655c5dc5..79b04b7ebbb2 100644 --- a/pkgs/development/python-modules/tempora/default.nix +++ b/pkgs/development/python-modules/tempora/default.nix @@ -1,7 +1,6 @@ { lib, buildPythonPackage, fetchPypi -, setuptools-scm, pytest, pytest-freezegun, freezegun, backports_unittest-mock +, setuptools-scm, pytestCheckHook, pytest-freezegun, freezegun, backports_unittest-mock , six, pytz, jaraco_functools, pythonOlder -, pytest-flake8, pytest-cov, pytest-black, pytest-mypy }: buildPythonPackage rec { @@ -20,14 +19,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ six pytz jaraco_functools ]; checkInputs = [ - pytest-freezegun pytest freezegun backports_unittest-mock - pytest-flake8 pytest-cov pytest-black pytest-mypy + pytest-freezegun pytestCheckHook freezegun backports_unittest-mock ]; - checkPhase = '' - pytest - ''; - meta = with lib; { description = "Objects and routines pertaining to date and time"; homepage = "https://github.com/jaraco/tempora";