From efffca371a47e4266e262d49e940ab991f148057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=B3pez=20Barr=C3=B3n?= Date: Sat, 9 Mar 2019 16:45:55 +1100 Subject: [PATCH] pytest_generate_tests remove `fork` only if it's in list --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1e46da3..2da68f7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,5 +34,6 @@ def pytest_generate_tests(metafunc): if 'start_method' in metafunc.fixturenames: from multiprocessing import get_all_start_methods methods = get_all_start_methods() - methods.remove('fork') + if 'fork' in methods: # fork not available on windows, so check before removing + methods.remove('fork') metafunc.parametrize("start_method", methods, scope='module')