depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-mock/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

53 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
pythonAtLeast,
pythonOlder,
fetchPypi,
pytest,
pytest-asyncio,
pytestCheckHook,
setuptools,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "pytest-mock";
version = "3.14.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-JxklWh7+zq28BW1r8989HFAVUw+0DPNHwPmvrIhBC9A=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
buildInputs = [ pytest ];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
disabledTests = lib.optionals (pythonAtLeast "3.11") [
# Regression in 3.11.7 and 3.12.1; https://github.com/pytest-dev/pytest-mock/issues/401
"test_failure_message_with_name"
"test_failure_message_with_no_name"
];
pythonImportsCheck = [ "pytest_mock" ];
meta = with lib; {
description = "Thin wrapper around the mock package for easier use with pytest";
homepage = "https://github.com/pytest-dev/pytest-mock";
changelog = "https://github.com/pytest-dev/pytest-mock/blob/v${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}