From d6e324a5e640382bcfcf6b2abeb024577edc01c3 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 27 Oct 2019 02:46:40 +0100 Subject: [PATCH] tests: conftest: handle tests using runpytest_subprocess as "slowest" --- testing/conftest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/conftest.py b/testing/conftest.py index a03efb0cf..8b0430f69 100644 --- a/testing/conftest.py +++ b/testing/conftest.py @@ -39,9 +39,12 @@ def pytest_collection_modifyitems(config, items): neutral_items.append(item) else: if "testdir" in fixtures: - if spawn_names.intersection(item.function.__code__.co_names): + co_names = item.function.__code__.co_names + if spawn_names.intersection(co_names): item.add_marker(pytest.mark.uses_pexpect) slowest_items.append(item) + elif "runpytest_subprocess" in co_names: + slowest_items.append(item) else: slow_items.append(item) item.add_marker(pytest.mark.slow)