2018-02-12 11:37:41 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, setuptools_scm }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mock";
|
2018-02-17 13:22:06 +00:00
|
|
|
version = "1.7.0";
|
2018-02-12 11:37:41 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-02-17 13:22:06 +00:00
|
|
|
sha256 = "8ed6c9ac6b7565b226b4da2da48876c9198d76401ec8d9c5e4c69b45423e33f8";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|