2018-07-20 17:44:44 -07:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, setuptools_scm }:
|
2018-02-12 03:37:41 -08:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mock";
|
2019-04-16 10:15:39 -07:00
|
|
|
version = "1.10.3";
|
2019-02-13 23:37:27 -08:00
|
|
|
|
2018-02-12 03:37:41 -08:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-04-16 10:15:39 -07:00
|
|
|
sha256 = "330bfa1a71c9b6e84e2976f01d70d8a174f755e7f9dc5b22f4b7335992e1e98b";
|
2018-02-12 03:37:41 -08:00
|
|
|
};
|
|
|
|
|
2019-02-13 23:37:27 -08:00
|
|
|
propagatedBuildInputs = lib.optional (!isPy3k) mock;
|
|
|
|
nativeBuildInputs = [ setuptools_scm pytest ];
|
2018-02-12 03:37:41 -08:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|