2018-07-21 00:44:44 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, setuptools_scm }:
|
2018-02-12 11:37:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mock";
|
2019-04-24 16:42:49 +00:00
|
|
|
version = "1.10.4";
|
2019-02-14 07:37:27 +00:00
|
|
|
|
2018-02-12 11:37:41 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-04-24 16:42:49 +00:00
|
|
|
sha256 = "5bf5771b1db93beac965a7347dc81c675ec4090cb841e49d9d34637a25c30568";
|
2018-02-12 11:37:41 +00:00
|
|
|
};
|
|
|
|
|
2019-02-14 07:37:27 +00:00
|
|
|
propagatedBuildInputs = lib.optional (!isPy3k) mock;
|
|
|
|
nativeBuildInputs = [ setuptools_scm pytest ];
|
2018-02-12 11:37:41 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|