Merge pull request #166246 from SuperSandro2000/remove-usage-pytest-black
This commit is contained in:
commit
f24d3eba64
@ -3,10 +3,7 @@
|
|||||||
, fetchPypi
|
, fetchPypi
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, isPy3k
|
, isPy3k
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, pytest-black
|
|
||||||
, pytest-flake8
|
|
||||||
, pytest-cov
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -20,12 +17,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ setuptools-scm ];
|
nativeBuildInputs = [ setuptools-scm ];
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-flake8 pytest-black pytest-cov ];
|
checkInputs = [ pytestCheckHook ];
|
||||||
# ironically, they fail a linting test, and pytest.ini forces that test suite
|
|
||||||
checkPhase = ''
|
|
||||||
rm backports/functools_lru_cache.py
|
|
||||||
pytest -k 'not format'
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Test fail on Python 2
|
# Test fail on Python 2
|
||||||
doCheck = isPy3k;
|
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)
|
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi
|
{ lib, buildPythonPackage, fetchPypi
|
||||||
, pytest, setuptools-scm, tempora, pytest-black, pytest-cov }:
|
, pytestCheckHook, setuptools-scm, tempora }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "portend";
|
pname = "portend";
|
||||||
@ -10,19 +10,11 @@ buildPythonPackage rec {
|
|||||||
sha256 = "239e3116045ea823f6df87d6168107ad75ccc0590e37242af0cc1e98c5d224e4";
|
sha256 = "239e3116045ea823f6df87d6168107ad75ccc0590e37242af0cc1e98c5d224e4";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace pytest.ini --replace "--flake8" ""
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ setuptools-scm ];
|
nativeBuildInputs = [ setuptools-scm ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ tempora ];
|
propagatedBuildInputs = [ tempora ];
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-black pytest-cov ];
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
py.test --deselect=test_portend.py::TestChecker::test_check_port_listening
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Some of the tests use localhost networking.
|
# Some of the tests use localhost networking.
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi
|
{ 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
|
, six, pytz, jaraco_functools, pythonOlder
|
||||||
, pytest-flake8, pytest-cov, pytest-black, pytest-mypy
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -20,14 +19,9 @@ buildPythonPackage rec {
|
|||||||
propagatedBuildInputs = [ six pytz jaraco_functools ];
|
propagatedBuildInputs = [ six pytz jaraco_functools ];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest-freezegun pytest freezegun backports_unittest-mock
|
pytest-freezegun pytestCheckHook freezegun backports_unittest-mock
|
||||||
pytest-flake8 pytest-cov pytest-black pytest-mypy
|
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
pytest
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Objects and routines pertaining to date and time";
|
description = "Objects and routines pertaining to date and time";
|
||||||
homepage = "https://github.com/jaraco/tempora";
|
homepage = "https://github.com/jaraco/tempora";
|
||||||
|
Loading…
Reference in New Issue
Block a user