python310Packages.backports_functools_lru_cache: switch to pytestCheckHook, remove linters

This commit is contained in:
Sandro Jäckel 2022-03-29 15:13:19 +02:00
parent 72dab1fa30
commit 9dbdba0618
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 2 additions and 23 deletions

View file

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

View file

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