Fix new ruff errors - #179
Merged
Merged
Conversation
alexfikl
commented
Aug 28, 2026
Comment on lines
623
to
627
| def test_oscillatory(): | ||
| # Oscillatory | ||
| approx_int, err_est = quadgk(lambda x: np.sin(x), 0, np.pi) | ||
| approx_int, err_est = quadgk(np.sin, 0, np.pi) | ||
| assert err_est < 1e-10 | ||
| check("integral sin(x) from 0 to pi", approx_int, 2.0) |
Collaborator
Author
There was a problem hiding this comment.
Are these tests here on purpose? Shouldn't they be in modepy/test?
Owner
There was a problem hiding this comment.
They are! I noticed this pattern in Rust code, where tests live alongside the code being tested, and rather liked it. At least for the packages where the tests live under the main package import, they're also guaranteed to be discovered. Do you not like this?
Collaborator
Author
There was a problem hiding this comment.
Hm.. I don't know, can't say I have too much of a preference. The main worry is just consistency, I guess? i.e. I wouldn't have looked here for tests.
Although I'm not a big fan of these being exported by default. Does pytest not find them if they're not in __all__?
Owner
|
Thx! |
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.
No description provided.