2018-10-16 19:58:18 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mock
|
2019-09-16 18:26:03 +01:00
|
|
|
, nose
|
2018-10-16 19:58:18 +01:00
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flaky";
|
2020-08-16 18:30:59 +01:00
|
|
|
version = "3.7.0";
|
2018-10-16 19:58:18 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 18:30:59 +01:00
|
|
|
sha256 = "3ad100780721a1911f57a165809b7ea265a7863305acb66708220820caf8aa0d";
|
2018-10-16 19:58:18 +01:00
|
|
|
};
|
|
|
|
|
2019-09-16 18:26:03 +01:00
|
|
|
checkInputs = [ mock nose pytest ];
|
2018-10-16 19:58:18 +01:00
|
|
|
|
2019-09-16 18:26:03 +01: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 19:58:18 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/box/flaky";
|
2018-10-16 19:58:18 +01:00
|
|
|
description = "Plugin for nose or py.test that automatically reruns flaky tests";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|