-
Notifications
You must be signed in to change notification settings - Fork 57
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
Eliminate warnings from test suite #799
Conversation
Codecov Report
@@ Coverage Diff @@
## master #799 +/- ##
=======================================
Coverage 94.07% 94.07%
=======================================
Files 42 42
Lines 5013 5013
=======================================
Hits 4716 4716
Misses 297 297 Continue to review full report at Codecov.
|
686b635
to
11fd151
Compare
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.
Looks good. Just a question below.
[testenv:warnings] | ||
basepython= python3.8 | ||
commands= | ||
pytest --remote-data -W error -W ignore::asdf.exceptions.AsdfDeprecationWarning:asdf.asdftypes |
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.
Can the -W ignore::asdf.exceptions.AsdfDeprecationWarning:asdf.asdftypes
be removed here as we capture and ignore it elsewhere?
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.
Or does this override the filterwarnings
directive in [tool:pytest]
?
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.
Right, that's the issue -- pytest uses the last matched rule to determine if the warning should be ignored, and filterwarnings
seems to get loaded first.
Thanks for the fix! Would it be possible to release a new version with this fix? 🙏 |
This fixes or hides the following warnings that come up when running our tests:
The pytest plugin has been updated to use
from_parent
when available.Some of the tests open a file that references schemas that have been deprecated. At some point we'll want to create new test data, but it seems like we should wait until the dust settles on moving schemas around. For the time being I just asked pytest to ignore the warning.
Changed
asdf.tests.helpers
to usesafe_load
instead.The PR also adds a not-required Travis build that converts warnings into errors.
Resolves #789