2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flaky";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "3.7.0";
|
2023-04-29 16:46:19 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-OtEAeAchoZEfV6FlgJt+omWnhjMFrLZnCCIIIMr4qg0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
mock
|
|
|
|
pytest
|
|
|
|
];
|
2020-04-24 23:36:52 +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
|
|
|
|
pytest --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/box/flaky";
|
|
|
|
description = "Plugin for nose or py.test that automatically reruns flaky tests";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|