1{ lib 2, buildPythonPackage 3, fetchPypi 4, mock 5, pytest 6}: 7 8buildPythonPackage rec { 9 pname = "flaky"; 10 version = "3.7.0"; 11 format = "setuptools"; 12 13 src = fetchPypi { 14 inherit pname version; 15 hash = "sha256-OtEAeAchoZEfV6FlgJt+omWnhjMFrLZnCCIIIMr4qg0="; 16 }; 17 18 nativeCheckInputs = [ 19 mock 20 pytest 21 ]; 22 23 checkPhase = '' 24 # based on tox.ini 25 pytest -k 'example and not options' --doctest-modules test/test_pytest/ 26 pytest -k 'example and not options' test/test_pytest/ 27 pytest -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py 28 pytest --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py 29 ''; 30 31 meta = with lib; { 32 homepage = "https://github.com/box/flaky"; 33 description = "Plugin for nose or py.test that automatically reruns flaky tests"; 34 license = licenses.asl20; 35 }; 36 37}