Mark network tests as flaky

This commit is contained in:
Pradyun S. Gedam 2017-05-19 08:48:45 +05:30
parent f16de42863
commit 8d66105cd7
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,11 @@ def pytest_collection_modifyitems(items):
for item in items:
if not hasattr(item, 'module'): # e.g.: DoctestTextfile
continue
# Mark network tests as flaky
if item.get_marker('network') is not None:
item.add_marker(pytest.mark.flaky(reruns=3))
module_path = os.path.relpath(
item.module.__file__,
os.path.commonprefix([__file__, item.module.__file__]),