Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter sources passed to the pytest invocation. #9299

Merged
merged 3 commits into from
Mar 15, 2020

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented Mar 13, 2020

Problem

We were passing all sources from the entire dep closure to the pytest EPR. This included, for example, the requirements.txt file. So modifying requirements.txt, even by just adding a comment, would cause pytest to be re-run, even if the change had no effect on the actual set of requirements.

Solution

Only pass python sources and resources to pytest.
Only pass python sources to the coverage config.

Result

Whitespace changes to requirements.txt no longer invalidate the pytest EPR.

@benjyw benjyw force-pushed the fix_spurious_test_invalidation branch from 1d3e813 to 0630de6 Compare March 13, 2020 23:39
@benjyw benjyw merged commit b5c8bfb into pantsbuild:master Mar 15, 2020
@benjyw benjyw deleted the fix_spurious_test_invalidation branch March 15, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants