Do not consider conftest.py a test module

This commit is contained in:
Pedro Algarvio 2021-01-09 08:29:36 +00:00
parent 4512595186
commit f45691cb17

View file

@ -1236,6 +1236,9 @@ def from_filenames_collection_modifyitems(config, items):
# Let's now go through the list of files gathered
for path in from_filenames_paths:
if path.as_posix().startswith("tests/"):
if path.name == "conftest.py":
# This is not a test module
continue
# Tests in the listing don't require additional matching and will be added to the
# list of tests to run
test_module_paths.add(path)