1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy3k
5, pytest
6, mock
7, setuptools-scm
8}:
9
10buildPythonPackage rec {
11 pname = "pytest-mock";
12 version = "2.0.0";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "b35eb281e93aafed138db25c8772b95d3756108b601947f89af503f8c629413f";
17 };
18
19 propagatedBuildInputs = lib.optional (!isPy3k) mock;
20
21 nativeBuildInputs = [
22 setuptools-scm
23 ];
24
25 checkInputs = [
26 pytest
27 ];
28
29 checkPhase = ''
30 pytest
31 '';
32
33 meta = with lib; {
34 description = "Thin-wrapper around the mock package for easier use with py.test.";
35 homepage = "https://github.com/pytest-dev/pytest-mock";
36 license = licenses.mit;
37 maintainers = with maintainers; [ ];
38 };
39}