Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytest 5, coverage 6, toml 7, tomli 8}: 9 10buildPythonPackage rec { 11 pname = "pytest-cov"; 12 version = "4.0.0"; 13 14 src = fetchPypi { 15 inherit pname version; 16 hash = "sha256-mWt5795kM829AIiHLbxfs+1/4VeLaM27pjTxS7jdBHA="; 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}