Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pytest-mock / default.nix
blobf956a62e1a5a0f5edd69b1b565460ef7f307757f
1 { lib
2 , buildPythonPackage
3 , pythonAtLeast
4 , pythonOlder
5 , fetchPypi
6 , pytest
7 , pytest-asyncio
8 , pytestCheckHook
9 , setuptools
10 , setuptools-scm
13 buildPythonPackage rec {
14   pname = "pytest-mock";
15   version = "3.12.0";
16   pyproject = true;
18   disabled = pythonOlder "3.7";
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-MaQPA4wiytMih7tDkyBURR/1WD/wlLym9nXfL4vBpuk=";
23   };
25   nativeBuildInputs = [
26     setuptools
27     setuptools-scm
28   ];
30   buildInputs = [
31     pytest
32   ];
34   nativeCheckInputs = [
35     pytest-asyncio
36     pytestCheckHook
37   ];
39   disabledTests = lib.optionals (pythonAtLeast "3.11") [
40     # Regression in 3.11.7 and 3.12.1; https://github.com/pytest-dev/pytest-mock/issues/401
41     "test_failure_message_with_name"
42     "test_failure_message_with_no_name"
43   ];
45   pythonImportsCheck = [ "pytest_mock" ];
47   meta = with lib; {
48     description = "Thin wrapper around the mock package for easier use with pytest";
49     homepage = "https://github.com/pytest-dev/pytest-mock";
50     changelog = "https://github.com/pytest-dev/pytest-mock/blob/v${version}/CHANGELOG.rst";
51     license = licenses.mit;
52     maintainers = with maintainers; [ dotlambda ];
53   };