Add "validation" pytest marker#2633
Conversation
Uses this SO trick for skipping marked tests by default https://stackoverflow.com/questions/66315234/exclude-some-tests-by-default/69185648#69185648
|
@erikvansebille @fluidnumericsJoe do you think we should add another github action workflow which can run the validation tests? Options:
|
erikvansebille
left a comment
There was a problem hiding this comment.
Looks good; two small comments below
| AdvectionRK4_3D, | ||
| ) | ||
|
|
||
| pytestmark = pytest.mark.validation |
There was a problem hiding this comment.
Why is this needed? Does not seem to be used in the rest of the script?
There was a problem hiding this comment.
This is used by Pytest (pytest is a mildly magical package in the sense that it looks for these sorts of specially named things). It marks the whole module as validation
You can see that by doing pytest -m validation
We could run the validation before we do a release? Perhaps simply by adding it to our own workflow notes? |
0f49441 to
8e92fe7
Compare
I think that sounds good |
|
Why would we skip them when other tests are run? Feels like a recipe to potentially miss things until we want to release and there's "one more thing" to do at release. If there's tests that fail then it could kill predictability here on time to release |
|
IMO the validation tests should be run on PRs and pushes to main. We previously had code that was "correct" but wasn't found out as problematic until these examples were run out of cycle in python notebooks; hence why they were brought in. |
|
Gotcha. Thanks for the input @fluidnumericsJoe . Since CI times were a concern last time we chatted, would it be useful to have it as another required workflow in GHA thats separate to the unit tests? Would that be a good solution? |
|
And I think you're right @fluidnumericsJoe - having this in the iteration cycle in CI is a good idea. |
Description
This PR:
validationmarker for the validation teststest_...)flakyandvalidationtests by default (also updates our CI to match)test-flakyandtest-validationpixi tasksChecklist
mainfor normal development,v3-supportfor v3 support)AI Disclosure
None used