mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Consider any test_*.py
in subdirectories when a conftest.py
file is changed
This commit is contained in:
parent
772f3a4332
commit
1fda51c346
1 changed files with 3 additions and 1 deletions
|
@ -1234,7 +1234,9 @@ def from_filenames_collection_modifyitems(config, items):
|
|||
for path in from_filenames_paths:
|
||||
if path.as_posix().startswith("tests/"):
|
||||
if path.name == "conftest.py":
|
||||
# This is not a test module
|
||||
# This is not a test module, but consider any test_*.py files in child directories
|
||||
for match in path.parent.rglob("test_*.py"):
|
||||
test_module_paths.add(match)
|
||||
continue
|
||||
# Tests in the listing don't require additional matching and will be added to the
|
||||
# list of tests to run
|
||||
|
|
Loading…
Add table
Reference in a new issue