2018-02-19 11:42:41 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, fetchpatch, isPy3k, pytest, mock, setuptools_scm }:
|
2018-02-12 12:37:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mock";
|
2018-04-07 14:16:28 +02:00
|
|
|
version = "1.8.0";
|
2018-02-12 12:37:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-04-07 14:16:28 +02:00
|
|
|
sha256 = "2dd545496af6a0559432b11de79f1fd4fa4a541ae2e01892d5ba6041f85f0994";
|
2018-02-12 12:37:41 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|