-
Notifications
You must be signed in to change notification settings - Fork 18
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
[V - Non-Rule] Rule-specific testing #51
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8ee3a67
add functionality to test only for specific rules
Ghesselink 64adb32
test rules from command line
Ghesselink 377f4e6
re match on rule folders
Ghesselink f083d2c
include pytest -sv scenario, allow for single file test
Ghesselink bd56ba0
Update test/test_main.py
aothms c1dd5e6
Apply suggestions
aothms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still find it a bit confusing:
test_for_rules
: why is this a boolean, why not dofilter()
instead ofany()
to filter out all non-rule code argv and use them belowx in fn.lower()
actually an uppercase argument will not workalb
will arbitrarily match word fragments such asalbino
which will be rather confusing. Test files are in separate directories so why not filter only on that directory name instead of entire file path?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's modified in 377f4e6
Done.
Done.
The aim was to also allow for uppercase input, such as
'Alb001'
or'ALB001'
instead of'alb001'
It should be good now: the regex match will still allow for this uppercase and it later converts into lowercases to match the folder name (which are always in lowercases, such as in 'alb001').Furthermore, there is a warning added in the case there is someone wants to test a non-existing rule code (e.g.
'alb005'
). This could be either a typo or it could mean that there are no test files added yet (or something else even). Nothing too spectecular, but it might help someone writing rules and testing it locally.