diff --git a/newsfragments/2642.bugfix.rst b/newsfragments/2642.bugfix.rst new file mode 100644 index 0000000000..8894b0b369 --- /dev/null +++ b/newsfragments/2642.bugfix.rst @@ -0,0 +1 @@ +Move ``flaky`` option to top-level conftest.py diff --git a/tests/conftest.py b/tests/conftest.py index a7cf695c10..cbd85933b9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -20,3 +20,7 @@ def address_conversion_func(request): @pytest.fixture() def open_port(): return get_open_port() + + +def pytest_addoption(parser): + parser.addoption("--flaky", action="store_true") diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index a2339dbc81..9d682122da 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -21,10 +21,6 @@ # --- integration test configurations --- # -def pytest_addoption(parser): - parser.addoption("--flaky", action="store_true") - - def pytest_collection_modifyitems(items, config): """ It is ideal to keep this configuration as simple as possible so that we don't