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