Breakup conditional for readability

This commit is contained in:
Pradyun Gedam 2020-10-25 23:02:59 +05:30
parent 08c99b6e00
commit 9faf431fbb
No known key found for this signature in database
GPG Key ID: FF99710C4332258E
1 changed files with 4 additions and 4 deletions

View File

@ -63,10 +63,10 @@ def pytest_collection_modifyitems(config, items):
if not hasattr(item, 'module'): # e.g.: DoctestTextfile
continue
# Mark network tests as flaky
if (item.get_closest_marker('network') is not None and
"CI" in os.environ):
item.add_marker(pytest.mark.flaky(reruns=3))
if "CI" in os.environ:
# Mark network tests as flaky
if item.get_closest_marker('network') is not None:
item.add_marker(pytest.mark.flaky(reruns=3))
if (item.get_closest_marker('fails_on_new_resolver') and
config.getoption("--new-resolver") and