2019-07-16 22:39:20 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch
|
|
|
|
, isPy3k
|
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
, setuptools_scm
|
|
|
|
}:
|
2018-02-12 11:37:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mock";
|
2020-11-29 14:04:39 +00:00
|
|
|
version = "3.3.1";
|
2019-02-14 07:37:27 +00:00
|
|
|
|
2018-02-12 11:37:41 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:39 +00:00
|
|
|
sha256 = "a4d6d37329e4a893e77d9ffa89e838dd2b45d5dc099984cf03c703ac8411bb82";
|
2018-02-12 11:37:41 +00:00
|
|
|
};
|
|
|
|
|
2019-02-14 07:37:27 +00:00
|
|
|
propagatedBuildInputs = lib.optional (!isPy3k) mock;
|
2019-07-16 22:39:20 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools_scm
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
2018-02-12 11:37:41 +00:00
|
|
|
|
2020-08-16 20:58:27 +01:00
|
|
|
# ignore test which only works with pytest5 output structure
|
2018-02-12 11:37:41 +00:00
|
|
|
checkPhase = ''
|
2020-08-16 20:58:27 +01:00
|
|
|
pytest -k 'not detailed_introspection_async'
|
2018-02-12 11:37:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Thin-wrapper around the mock package for easier use with py.test.";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/pytest-dev/pytest-mock";
|
2018-02-12 11:37:41 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|