-
Notifications
You must be signed in to change notification settings - Fork 159
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
Update tests #789
Merged
Merged
Update tests #789
Conversation
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #789 +/- ##
=====================================
Coverage 95.2% 95.2%
=====================================
Files 46 46
Lines 4335 4335
=====================================
Hits 4130 4130
Misses 205 205
|
khaeru
requested changes
Jan 30, 2024
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.
Seems good! One change and one question, maybe a change.
22a49e3
to
96041ca
Compare
khaeru
approved these changes
Jan 31, 2024
ywpratama
pushed a commit
to ywpratama/message_ix
that referenced
this pull request
Jan 15, 2025
* Adjust test to code behaviour * Bump GHA version numbers for Node.js 20 * Reify updated test * Temporarily install genno < 1.23 in pytest CI
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.
The current CI failures have multiple causes. One is pytest 8.0.0, for which this PR adjusts. The affected test was working properly, as far as I can tell, by raising a ValueError before the DeprecationWarning. In the past, since a ValueError was given as the expected result of the test, this was fine; but now, pytest wants to see the DeprecationWarning.
On other tests, one can run
with pytest.raises(ValueError, match="something")
to specify which ValueError is raised -- which would have made us aware of this issue long ago sinceScenario.add_horizon()
raises ValueErrors on multiple occasions. From pytest's docs, it doesn't look like we can pass amatch=
string to the xfail mark, so I'm wondering how much refactoring if would take to implement this. Another option would be to subclass ValueError and raise custom unique errors for the various fail cases, which we can then tell pytest to expect.This PR also temporarily pins genno < 1.23 and can be used to upgrade Node.js actions as GHA recommends.
How to review
PR checklist
[ ] Add, expand, or update documentation.Just updating tests[ ] Update release notes.Just updating tests