3
0
Fork 0
forked from mirrors/nixpkgs

python.pkgs.pytest-mock: use 2.0.0 for python 2

This commit is contained in:
Frederik Rietdijk 2020-06-07 11:28:47 +02:00
parent 535ae9d44e
commit 224d7b129c
2 changed files with 44 additions and 1 deletions

View file

@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy3k
, pytest
, mock
, setuptools_scm
}:
buildPythonPackage rec {
pname = "pytest-mock";
version = "2.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "b35eb281e93aafed138db25c8772b95d3756108b601947f89af503f8c629413f";
};
propagatedBuildInputs = lib.optional (!isPy3k) mock;
nativeBuildInputs = [
setuptools_scm
];
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Thin-wrapper around the mock package for easier use with py.test.";
homepage = "https://github.com/pytest-dev/pytest-mock";
license = licenses.mit;
maintainers = with maintainers; [ nand0p ];
};
}

View file

@ -2527,7 +2527,10 @@ in {
pytest-mpl = callPackage ../development/python-modules/pytest-mpl { };
pytest-mock = callPackage ../development/python-modules/pytest-mock { };
pytest-mock = if isPy3k then
callPackage ../development/python-modules/pytest-mock { }
else
callPackage ../development/python-modules/pytest-mock/2.nix { };
pytest-openfiles = callPackage ../development/python-modules/pytest-openfiles { };