-
Notifications
You must be signed in to change notification settings - Fork 11
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
Clean up some low-hanging warnings in test suite #310
Merged
Merged
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
Spglib 2.5 introduces dataclasses for many of its data objects, and raises a DeprecationWarning if you try to use it as a dictionary. That's very nice, but we'd like to support a range of versions, so for now we convert the new classes to a dict. We can migrate when these versions of Spglib are more established.
Maybe when seekpath fixes this we can bump both version requirements?
The warning was still raised in the main test. In order to suppress this without suppressing unexpected warnings, we may as well check it raised correctly. The other test is then fully redundant.
Otherwise a warning is raised.
Test Results 22 files ± 0 22 suites ±0 29m 53s ⏱️ -29s Results for commit bbf31ca. ± Comparison against base commit 8c87ed6. This pull request removes 37 and adds 35 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
To deal with broadening bin warnings, this uses an elegant approach to error/warning "expectations" suggested by the pytest docs. We find that different warning messages are raised by ostensibly the same problem, depending on the code path. That's not ideal, but can stay for now. A unit-strip warning in test_mul is also fixed.
Testing separately results in an un-caught warning. May as well check in one place.
- use "context" as name; the word "expected" appears enough already - use dummy context manager does_not_raise to simplify implementation in test_util
ajjackson
added
the
nice to have
Not urgently required, but would be an improvement
label
Jul 24, 2024
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.
There is a divide-by-zero warning which I think has its roots in nasty pint/spectroscopy units hackery. That is not just an artifact and should be dealt with in a separate PR.