2018-10-16 20:58:18 +02:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mock
|
2019-09-16 19:26:03 +02:00
|
|
|
, nose
|
2018-10-16 20:58:18 +02:00
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flaky";
|
2019-09-16 19:26:03 +02:00
|
|
|
version = "3.6.1";
|
2018-10-16 20:58:18 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-09-16 19:26:03 +02:00
|
|
|
sha256 = "8cd5455bb00c677f787da424eaf8c4a58a922d0e97126d3085db5b279a98b698";
|
2018-10-16 20:58:18 +02:00
|
|
|
};
|
|
|
|
|
2019-09-16 19:26:03 +02:00
|
|
|
checkInputs = [ mock nose pytest ];
|
2018-10-16 20:58:18 +02:00
|
|
|
|
2019-09-16 19:26:03 +02:00
|
|
|
checkPhase = ''
|
|
|
|
# based on tox.ini
|
|
|
|
pytest -k 'example and not options' --doctest-modules test/test_pytest/
|
|
|
|
pytest -k 'example and not options' test/test_pytest/
|
|
|
|
pytest -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py
|
|
|
|
nosetests --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py
|
|
|
|
pytest --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py
|
|
|
|
'';
|
2018-10-16 20:58:18 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/box/flaky;
|
|
|
|
description = "Plugin for nose or py.test that automatically reruns flaky tests";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|