From 01531115752a557df0a8e5064d60707c256fb400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 25 Jun 2020 10:24:38 +0100 Subject: [PATCH] python3.pkgs.tempora: fix tests --- ...-pytest-remove-flake8-black-coverage.patch | 28 +++++++++++++++++++ .../python-modules/tempora/default.nix | 14 ++++++---- 2 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch diff --git a/pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch b/pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch new file mode 100644 index 000000000000..f807a6d2515e --- /dev/null +++ b/pkgs/development/python-modules/tempora/0001-pytest-remove-flake8-black-coverage.patch @@ -0,0 +1,28 @@ +From 9dfd2a8fac4a643fd007390762ccc8564588b4bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= +Date: Thu, 25 Jun 2020 10:16:52 +0100 +Subject: [PATCH] pytest: remove flake8/black/coverage +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jörg Thalheim +--- + pytest.ini | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pytest.ini b/pytest.ini +index bd6998d..a464529 100644 +--- a/pytest.ini ++++ b/pytest.ini +@@ -1,6 +1,6 @@ + [pytest] + norecursedirs=dist build .tox .eggs +-addopts=--doctest-modules --flake8 --black --cov ++addopts=--doctest-modules + doctest_optionflags=ALLOW_UNICODE ELLIPSIS + filterwarnings= + # suppress known warning +-- +2.27.0 + diff --git a/pkgs/development/python-modules/tempora/default.nix b/pkgs/development/python-modules/tempora/default.nix index 9b54953d28ce..11a98bd370be 100644 --- a/pkgs/development/python-modules/tempora/default.nix +++ b/pkgs/development/python-modules/tempora/default.nix @@ -1,6 +1,5 @@ { lib, buildPythonPackage, fetchPypi -, setuptools_scm, pytest, freezegun, backports_unittest-mock -, pytest-black, pytestcov, pytest-flake8 +, setuptools_scm, pytest, pytest-freezegun, freezegun, backports_unittest-mock , six, pytz, jaraco_functools }: buildPythonPackage rec { @@ -14,13 +13,18 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools_scm ]; + patches = [ + ./0001-pytest-remove-flake8-black-coverage.patch + ]; + propagatedBuildInputs = [ six pytz jaraco_functools ]; - checkInputs = [ pytest pytest-flake8 pytest-black pytestcov freezegun backports_unittest-mock ]; + checkInputs = [ + pytest-freezegun pytest freezegun backports_unittest-mock + ]; - # missing pytest-freezegun package checkPhase = '' - pytest -k 'not get_nearest_year_for_day' + pytest ''; meta = with lib; {