python310Packages.backports_functools_lru_cache: switch to pytestCheckHook, remove linters

main
Sandro Jäckel 2 years ago
parent 72dab1fa30
commit 9dbdba0618
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
  1. 12
      pkgs/development/python-modules/backports_functools_lru_cache/default.nix
  2. 13
      pkgs/development/python-modules/portend/black-19.10b0.patch

@ -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;

@ -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)
Loading…
Cancel
Save