1{ 2 lib, 3 buildPythonPackage, 4 pythonAtLeast, 5 pythonOlder, 6 fetchPypi, 7 pytest, 8 pytest-asyncio, 9 pytestCheckHook, 10 setuptools, 11 setuptools-scm, 12}: 13 14buildPythonPackage rec { 15 pname = "pytest-mock"; 16 version = "3.14.0"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-JxklWh7+zq28BW1r8989HFAVUw+0DPNHwPmvrIhBC9A="; 24 }; 25 26 nativeBuildInputs = [ 27 setuptools 28 setuptools-scm 29 ]; 30 31 buildInputs = [ pytest ]; 32 33 nativeCheckInputs = [ 34 pytest-asyncio 35 pytestCheckHook 36 ]; 37 38 disabledTests = lib.optionals (pythonAtLeast "3.11") [ 39 # Regression in 3.11.7 and 3.12.1; https://github.com/pytest-dev/pytest-mock/issues/401 40 "test_failure_message_with_name" 41 "test_failure_message_with_no_name" 42 ]; 43 44 pythonImportsCheck = [ "pytest_mock" ]; 45 46 meta = with lib; { 47 description = "Thin wrapper around the mock package for easier use with pytest"; 48 homepage = "https://github.com/pytest-dev/pytest-mock"; 49 changelog = "https://github.com/pytest-dev/pytest-mock/blob/v${version}/CHANGELOG.rst"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ dotlambda ]; 52 }; 53}