fix(test-forks): report tests dropped by validity markers and by generation - #3468
Open
mkzung wants to merge 2 commits into
Open
fix(test-forks): report tests dropped by validity markers and by generation#3468mkzung wants to merge 2 commits into
mkzung wants to merge 2 commits into
Conversation
`filter_combinations` hands its removals to `pytest_deselected` and prints a summary. The param-level validity path only deleted them, so they appeared in no count. On `tests/` that hides 674 removals while the terminal reports 74. Emptying a test stays non-fatal here: a narrow `--from`/`--until` range legitimately excludes every param of a test written for later forks.
A test whose validity markers meet no selected fork is never parametrized, so it becomes no item and no deselection hook can carry it. Against a development fork this is the whole of ethereum#3260: `valid_at` names forks literally, a subclass fork is never named, and thirteen tests leave no trace at all. Collection now ends with a count of them, and names each at `-vv`. On `tests/` that is one line for 771; `tests/osaka --until=Berlin` reports 67.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3468 +/- ##
================================================
Coverage 93.90% 93.90%
================================================
Files 624 624
Lines 36905 36905
Branches 3326 3326
================================================
Hits 34655 34655
Misses 1569 1569
Partials 681 681
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A filter reports what it deselects and a validity marker does not, so two ways of dropping a test look different in the same run.
pytest_collection_modifyitemsbuildsfilter_statsand prints a line per function for--fill-untiland friends, while a param dropped because its fork is outside the marker's validity range leaves nothing behind.Generation has the same gap one step earlier. When
test_fork_setor the intersection with the selected forks comes out empty,pytest_generate_testsdrops the test without parametrizing it at all, so it never reaches collection and no count anywhere accounts for it. Only-vvshows it, as a skip.Two commits, one for each gap. One records validity-marker deselections beside the existing filter stats. Its pair stashes the node id and the reason whenever generation is about to drop a test unparametrized, then reports the total, so a run says how many tests it never generated rather than silently omitting them.
Three tests cover it: a param-level deselection where every case of a function goes, an unparametrized count, and that reporting line itself. Reverting
forks.pyalone fails all three.Related Issues or PRs
Follows #3461, which fixed the config that could not collect these directories at all.
Checklist
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture