Translate tests: raise if test class can't be found#259
Merged
romanc merged 4 commits intoOct 10, 2025
Conversation
while it is expected for a test to fail if that happens, this isn't proper usage of the `xfail` marker. because doing so will just hide that tests aren't running, e.g. see NOAA-GFDL/pySHiELD#65.
skip_test is an option of our translate test system. let's be nice an allow users of the translate test system to use that option as part of the constructor arguments.
8 tasks
7 tasks
FlorianDeconinck
approved these changes
Oct 10, 2025
Collaborator
FlorianDeconinck
left a comment
There was a problem hiding this comment.
Well that's a gaping hole in the testing framework... Good thinking.
fmalatino
approved these changes
Oct 10, 2025
jjuyeonkim
approved these changes
Oct 10, 2025
Collaborator
jjuyeonkim
left a comment
There was a problem hiding this comment.
I like exposing the skip_test too
…est-raise-if-not-found
Collaborator
Author
|
@FlorianDeconinck FYI with the cleanup of the public API / exports of |
Collaborator
|
Nice 🤩 |
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.
Description
Typing work in #258 highlighted an issue with the translate test configuration in pySHiELD, see NOAA-GFDL/pySHiELD#65. Long story short, if tests aren't registered correctly, they are currently marked as
xfailandpytestdoesn't complain. The tests also don't run, so 🤷 ...This PR suggest to
raiseaValueErrorif translate tests aren't properly configured such that users of the test system know that their tests aren't running.The PR also includes two minor cleanup commit (that were made apparent as part of NOAA-GFDL/pySHiELD#65):
skip_testas constructor argument of translate testsndsl.initialization. This is also a way to be future proof with regards to planned refactors in NDSL directories refactor & public API enforcement #243.How has this been tested?
All good as long as CI is green. Merging is currently blocked by NOAA-GFDL/pySHiELD#65, which will properly register and skip the translate test for
GFSPhysicsDriver.Checklist
N/A
N/A