You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: wildcards in pytest testpaths are compared as literal paths #208
isPytestFile (src/repo/adapters/python.ts) treats every testpaths entry as a literal directory prefix. pytest expands each entry with glob.iglob(entry, recursive=True), so wildcards are allowed.
pyproject.toml [tool.pytest.ini_options]
testpaths = ["tests", "pkgs/*/tests"]
pythonpath = ["pkgs/a"]
tests/test_t.py
pkgs/a/lib.py
pkgs/a/tests/test_lib.py from lib import f
python -m pytest --co collects both tests/test_t.py and pkgs/a/tests/test_lib.py.
Expected:pkgs/a/tests/test_lib.py is a test file, and a change to pkgs/a/lib.py selects it.
Actual:pythonTests is ["tests/test_t.py"]. The change to pkgs/a/lib.py gives fallbackRequired: false and no affected tests. With only testpaths = ["pkgs/*/tests"], the empty test universe falls back instead.
Activity