From aec0e4ca40fe5e70e4f1142870c8ba36db27ec79 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 5 Sep 2016 13:16:48 +0200 Subject: [PATCH] tests: Fix applying of end2end marker --- tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index aac0e2014..a53223dff 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -104,7 +104,9 @@ def pytest_collection_modifyitems(items): item.module.__file__, os.path.commonprefix([__file__, item.module.__file__])) - module_root_dir = os.path.split(module_path)[0] + module_root_dir = module_path.split(os.sep)[0] + assert module_root_dir in ['end2end', 'unit', 'helpers', + 'test_conftest.py'] if module_root_dir == 'end2end': item.add_marker(pytest.mark.end2end)