diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2021-12-27 02:00:34 +0100 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-12-26 19:31:43 -0800 |
commit | 9bb624e69f41ae0e397c0f78ffc05ba5392b02b2 (patch) | |
tree | a229f323461bdede8194c1fba2cd7dd1ccc139ae /pkgs/development/python-modules/pytest | |
parent | 2db51d1e742bd83e5277e81340c42c2775af93ed (diff) |
python310Packages.pytest: fix tests
Diffstat (limited to 'pkgs/development/python-modules/pytest')
-rw-r--r-- | pkgs/development/python-modules/pytest/default.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix index ac036936b991a..0b1bb2b02030b 100644 --- a/pkgs/development/python-modules/pytest/default.nix +++ b/pkgs/development/python-modules/pytest/default.nix @@ -1,4 +1,5 @@ { lib, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, isPyPy +, pythonAtLeast, fetchpatch , atomicwrites , attrs , hypothesis @@ -27,10 +28,13 @@ buildPythonPackage rec { sha256 = "131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "pluggy>=0.12,<1.0.0a1" "pluggy>=0.23,<2.0" - ''; + patches = lib.optionals (pythonAtLeast "3.10") [ + (fetchpatch { + # Fix test_errors_in_xfail_skip_expressions for Python 3.10.1, remove after 6.2.5 + url = "https://github.com/pytest-dev/pytest/commit/913439f5e5691f391e2969b3c8f0a49e50dce43a.patch"; + sha256 = "0hsl3lww6bx5k99cp8gj0fy9rg02kcfbwiiwjx2y8vbhwd5ns41p"; + }) + ]; nativeBuildInputs = [ setuptools-scm ]; |