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