Repository navigation
Fix testcase order - #522
Merged
Merged
Conversation
pehrsoderman
approved these changes
Nov 5, 2026
|
|
||
| # Not test classes -- just named that way by the model. Tell pytest not to collect them. | ||
| TestCase.__test__ = False # type: ignore[attr-defined] | ||
| TestDataGroup.__test__ = False # type: ignore[attr-defined] |
Contributor
There was a problem hiding this comment.
My PyTest is a bit rusty, but this looks out of place to me. Shouldn't this be in in the class bodies in model/testdata.py?
Contributor
Author
There was a problem hiding this comment.
Yes, that's another way to do it. I have a somewhat strong preference to not clutter our production code with test cruft.
Admittedly, for these two classes, I am considering making an exception. But not in this PR.
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.
Fixes a bug with the order of test cases. The test case
foowas being run before the test casefoo-bar. This since the code accidentally sorted test cases on the name of their.ansfile, and- < .. Fixes the same bug for samples in markdown statements.Also adds a check to prevent a test case group from being a sibling to a test case with the same name (e.g.
foo/...,foo.in,foo.ansin the same directory).