diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix index 38b94f270461..8c40c835feb0 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.1.1"; - disabled = !isPy3k; + format = "pyproject"; src = fetchPypi { inherit pname version; 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: