Extend unit test with the ability to assert certain files not existing - #261
Open
furtib wants to merge 4 commits into
Open
Extend unit test with the ability to assert certain files not existing#261furtib wants to merge 4 commits into
furtib wants to merge 4 commits into
Conversation
Szelethus
reviewed
Jul 5, 2026
Szelethus
left a comment
Collaborator
There was a problem hiding this comment.
I know I'm nitpicking, but the phrasing is off. The overall PR direction is good.
| args = parse_args() | ||
| check_args(args) | ||
|
|
||
| assert_files_missing(args.no_files) |
Collaborator
There was a problem hiding this comment.
I've been looking at this PR for a bit, and this is the point that convinced me that "absent" isn't the correct phrase. You write "missing" here, but those files are "absent", but that doesn't really telegraph whats desiren, which is "expectedly missing" or "should be missing".
Contributor
Author
There was a problem hiding this comment.
renamed it to expected_missing_file.
Co-authored-by: Kristóf Umann <dkszelethus@gmail.com>
Szelethus
approved these changes
Jul 29, 2026
Szelethus
left a comment
Collaborator
There was a problem hiding this comment.
LGTM after some naming adjustments.
| help="Path or glob pattern to the file(s) to search within.", | ||
| ) | ||
| parser.add_argument( | ||
| "--no_files", |
Collaborator
There was a problem hiding this comment.
Can we adjust this name as well?
| """Entry point for the pattern-matching test.""" | ||
| args = parse_args() | ||
| check_args(args) | ||
| def assert_files_missing(files): |
Collaborator
There was a problem hiding this comment.
Suggested change
| def assert_files_missing(files): | |
| def assert_expectedly_missing_files(files): |
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.
Why:
We want to be able to write tests that assert that certain files do not exist (and require that all files listed under files exist).
What:
file = ["..."]patterns to match a file.Addresses:
none