1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

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

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__]),