2018-02-26 21:53:18 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, setuptools_scm }:
|
2018-02-12 11:37:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mock";
|
2018-03-05 08:22:41 +00:00
|
|
|
version = "1.7.1";
|
2018-02-12 11:37:41 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-03-05 08:22:41 +00:00
|
|
|
sha256 = "0jgr1h1f0m9dl3alxiiw55as28pj2lpihz12gird9z1i3vvdyydq";
|
2018-02-12 11:37:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pytest ] ++ lib.optional (!isPy3k) mock;
|
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|