Skip to content

Commit c2929c9

Browse files
committed
Mark test_validate_doi as flaky
Some resolvers abuse HTTP 403 to mean HTTP 429 (Too Many Requests) and therefore make the test more flaky. Rerunning usually avoids this issue.
1 parent c67beee commit c2929c9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def get_version(filename):
2222

2323
dev_requirements = [
2424
'coverage', 'pytest', 'pytest-cov==2.5.0', 'twine', 'pep8',
25+
'pytest-rerunfailures',
2526
'flake8', 'wheel', 'mypy',
2627
'sphinx', 'sphinx-autobuild', 'sphinx-autodoc-typehints',
2728
'sphinx_rtd_theme']

tests/test_doi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_valid_version() -> None:
4545

4646

4747
@pytest.mark.net
48+
@pytest.mark.flaky(reruns=5, reruns_delay=1, rerun_except="HTTPError")
4849
def test_validate_doi() -> None:
4950
data = [
5051
('10.1063/1.5081715',

0 commit comments

Comments
 (0)