1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pytest, 6 coverage, 7 toml, 8 tomli, 9}: 10 11buildPythonPackage rec { 12 pname = "pytest-cov"; 13 version = "4.1.0"; 14 format = "setuptools"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-OQSxPfv+xH8AO453/VtYnNEZBKId3xqzimTyBNahDvY="; 19 }; 20 21 buildInputs = [ pytest ]; 22 23 propagatedBuildInputs = [ 24 coverage 25 toml 26 tomli 27 ]; 28 29 # xdist related tests fail with the following error 30 # OSError: [Errno 13] Permission denied: 'py/_code' 31 doCheck = false; 32 checkPhase = '' 33 # allow to find the module helper during the test run 34 export PYTHONPATH=$PYTHONPATH:$PWD/tests 35 py.test tests 36 ''; 37 38 pythonImportsCheck = [ "pytest_cov" ]; 39 40 meta = with lib; { 41 description = "Plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing"; 42 homepage = "https://github.com/pytest-dev/pytest-cov"; 43 license = licenses.mit; 44 }; 45}