summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pytest/default.nix')
-rw-r--r--pkgs/development/python-modules/pytest/default.nix51
1 files changed, 24 insertions, 27 deletions
diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix
index 109e9182858..8c40c835feb 100644
--- a/pkgs/development/python-modules/pytest/default.nix
+++ b/pkgs/development/python-modules/pytest/default.nix
@@ -1,47 +1,48 @@
-{ lib, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, isPyPy
-, atomicwrites
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchPypi
+, isPyPy
+, writeText
+
+# build
+, setuptools-scm
+
+# propagates
 , attrs
-, hypothesis
 , iniconfig
-, more-itertools
 , packaging
-, pathlib2
 , pluggy
 , py
-, pygments
-, setuptools
-, setuptools-scm
-, six
 , tomli
-, wcwidth
-, writeText
+
+# tests
+, hypothesis
+, pygments
 }:
 
 buildPythonPackage rec {
   pname = "pytest";
-  version = "7.0.1";
-  disabled = !isPy3k;
+  version = "7.1.1";
+  format = "pyproject";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-4wkFoMEx09lLiWJKHMWv7D4LovvbFRhn2ODr1JhQ8XE=";
+    sha256 = "sha256-hBEyyu9rGtF6mv3kbcT2z6WaBflVWq5RUfc73yggymM=";
   };
 
-  nativeBuildInputs = [ setuptools-scm ];
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
 
   propagatedBuildInputs = [
-    atomicwrites
     attrs
     iniconfig
-    more-itertools
     packaging
     pluggy
     py
-    setuptools
-    six
     tomli
-    wcwidth
-  ] ++ lib.optionals (pythonOlder "3.6") [ pathlib2 ];
+  ];
 
   checkInputs = [
     hypothesis
@@ -50,17 +51,13 @@ buildPythonPackage rec {
 
   doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460
 
-  preCheck = ''
-    # don't test bash builtins
-    rm testing/test_argcomplete.py
-  '';
-
   # Ignored file https://github.com/pytest-dev/pytest/pull/5605#issuecomment-522243929
   # test_missing_required_plugins will emit deprecation warning which is treated as error
   checkPhase = ''
     runHook preCheck
     $out/bin/py.test -x testing/ \
       --ignore=testing/test_junitxml.py \
+      --ignore=testing/test_argcomplete.py \
       -k "not test_collect_pyargs_with_testpaths and not test_missing_required_plugins"
 
     # tests leave behind unreproducible pytest binaries in the output directory, remove:
@@ -86,7 +83,7 @@ buildPythonPackage rec {
     # - files are not needed after tests are finished
     pytestRemoveBytecodePhase () {
         # suffix is defined at:
-        #    https://github.com/pytest-dev/pytest/blob/7.0.1/src/_pytest/assertion/rewrite.py#L51-L53
+        #    https://github.com/pytest-dev/pytest/blob/7.1.1/src/_pytest/assertion/rewrite.py#L51-L53
         find $out -name "*-pytest-*.py[co]" -delete
     }
     preDistPhases+=" pytestRemoveBytecodePhase"