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: a data file read by a pytest test selects nothing and does not fall back #255
resolveByReference in src/repo/impact.ts passes isSourceFilePath as isCodeFile to resolveFileReferences. .py is not a source extension there, so a pytest test that reads a changed data file is treated as a transitive script reader (.py is in DIRECTING_EXTENSIONS). Nothing names a test file, so the chain ends, and a found transitive reader counts as "the suite cannot observe the file". The change selects nothing and does not fall back.
Repro:pyproject.toml with [tool.pytest.ini_options] testpaths = ["tests"], tests/data/prices.csv, and tests/test_prices.py reading Path(__file__).parent / "data" / "prices.csv". Change prices.csv.
Expected:tests/test_prices.py is selected, as test/f.test.js is for the same layout in a JavaScript repository.
Actual: no affected tests, fallbackRequired: false, analysis status SAFE_TO_PROPOSE. The same happens when a module under pkg/ reads the file and a test imports that module.
Related: #162 asks for a declared-inputs example for this layout. Declared inputs work around it, but without them the result is a silent skip rather than a fallback.
Activity