nixpkgs/pkgs/development/python-modules/pytest-mock/default.nix

41 lines
737 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy3k
, pytest
, mock
, setuptools_scm
}:
buildPythonPackage rec {
pname = "pytest-mock";
2020-06-06 07:47:27 +01:00
version = "3.1.1";
2019-02-14 07:37:27 +00:00
src = fetchPypi {
inherit pname version;
2020-06-06 07:47:27 +01:00
sha256 = "636e792f7dd9e2c80657e174c04bf7aa92672350090736d82e97e92ce8f68737";
};
2019-02-14 07:37:27 +00:00
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 ];
};
}