Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 30 lines 883 B view raw
1{ stdenv, buildPythonPackage, fetchPypi 2, pytest, coverage }: 3 4buildPythonPackage rec { 5 pname = "pytest-cov"; 6 version = "2.6.1"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "0ab664b25c6aa9716cbf203b17ddb301932383046082c081b9848a0edf5add33"; 11 }; 12 13 buildInputs = [ pytest ]; 14 propagatedBuildInputs = [ coverage ]; 15 16 # xdist related tests fail with the following error 17 # OSError: [Errno 13] Permission denied: 'py/_code' 18 doCheck = false; 19 checkPhase = '' 20 # allow to find the module helper during the test run 21 export PYTHONPATH=$PYTHONPATH:$PWD/tests 22 py.test tests 23 ''; 24 25 meta = with stdenv.lib; { 26 description = "Plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing"; 27 homepage = https://github.com/pytest-dev/pytest-cov; 28 license = licenses.mit; 29 }; 30}