diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96885a83ebb4..62901ef20520 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1991,15 +1991,17 @@ in { pyhepmc = callPackage ../development/python-modules/pyhepmc { }; - pytest = if isPy3k then - callPackage ../development/python-modules/pytest { - # hypothesis tests require pytest that causes dependency cycle - hypothesis = self.hypothesis.override { doCheck = false; }; - } - else callPackage ../development/python-modules/pytest/2.nix { - # hypothesis tests require pytest that causes dependency cycle - hypothesis = self.hypothesis.override { doCheck = false; }; - }; + pytest = if isPy3k then self.pytest_5 else self.pytest_4; + + pytest_5 = callPackage ../development/python-modules/pytest { + # hypothesis tests require pytest that causes dependency cycle + hypothesis = self.hypothesis.override { doCheck = false; }; + }; + + pytest_4 = callPackage ../development/python-modules/pytest/4.nix { + # hypothesis tests require pytest that causes dependency cycle + hypothesis = self.hypothesis.override { doCheck = false; }; + }; pytest-helpers-namespace = callPackage ../development/python-modules/pytest-helpers-namespace { };