Repository navigation
feat(cli): explain a --filter that matches nothing - #1238
Merged
Merged
Conversation
The report prints a humanized title while --filter matches the function name, case-sensitively, so copying the name just read selects nothing and the run ends on a bare "No tests found". The space is not required for this: test_alpha prints as "Alpha", and --filter Alpha finds nothing either. The run knows the filter and every function it sourced, so it now names the test it most likely meant, resolving both differences -- lowercase the filter, and put underscores back where the title shows spaces. With no plausible candidate it states the rule instead of guessing. Prints only when a filter was given, so an empty run for any other reason is byte-identical to before, which is what keeps the path snapshot valid. Only the filter is lowercased, never the candidate list, so there is no fork per function on a path that has already decided to run nothing. Covered in both modes: the summary renders in the parent, but that boundary has produced silent divergences here before. Closes #1237
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.
🤔 Background
Related #1237
The report prints a humanized title while
--filtermatches the function name, case-sensitively. Copying the name you just read therefore selects nothing, and the run ends on a bareNo tests foundwith nowhere to go. The space is not required for this —test_alphaprints asAlpha, and--filter Alphafinds nothing either.💡 Changes
--filternames the test it most likely meant, resolving both differences: lowercase the filter, and put underscores back where the humanized title shows spaces--paralleltoo: the summary renders in the parent, but that boundary has produced silent divergences in this project before (A @data_provider that yields no data makes the test vanish #1145, Duplicate test functions go undetected under --parallel #1147)Only the filter is lowercased, never the candidate list, so there is no fork per function on a path that has already decided to run nothing.