1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, fetchpatch
6, pytest
7, pytest-asyncio
8, pytestCheckHook
9, setuptools-scm
10}:
11
12buildPythonPackage rec {
13 pname = "pytest-mock";
14 version = "3.11.1";
15
16 disabled = pythonOlder "3.7";
17
18 format = "setuptools";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-f2sSVgKsbXQ+Ujrgv6ceGml6L1U0BkUoxv+EwvfC/H8=";
23 };
24
25 nativeBuildInputs = [ setuptools-scm ];
26
27 buildInputs = [
28 pytest
29 ];
30
31 nativeCheckInputs = [
32 pytest-asyncio
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [ "pytest_mock" ];
37
38 meta = with lib; {
39 description = "Thin wrapper around the mock package for easier use with pytest";
40 homepage = "https://github.com/pytest-dev/pytest-mock";
41 changelog = "https://github.com/pytest-dev/pytest-mock/blob/v${version}/CHANGELOG.rst";
42 license = licenses.mit;
43 maintainers = with maintainers; [ dotlambda ];
44 };
45}