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