From 9faf431fbbd2c1fe94ee14aea096480123b0a6c6 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sun, 25 Oct 2020 23:02:59 +0530 Subject: [PATCH] Breakup conditional for readability --- tests/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index ffd9f4215..81e136688 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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