Skip to content
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

Cleaning up test warnings #1625

Merged
merged 2 commits into from Aug 3, 2020
Merged

Conversation

greglucas
Copy link
Contributor

This cleans up the warnings from the test suite.

First commit: Deprecation warning from MPL for reusing the same axes. They aren't image tests, so weren't closing the figures. Fixed this by calling close after each non-image comparison test.

Second commit: Catch the expected DownloadWarning with pytest to remove that warning.

Rationale

Fewer warnings

Implications

This prevents deprecation warnings for using a previously defined axes.
This catches the DownloadWarning emitted every time the test
suite is run.
Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sensible enough. Any more to go in to take care of more of the warnings?

@greglucas
Copy link
Contributor Author

This took care of all of the warnings on my local setup (other than for external packages like owslib). Let me know if you saw others I should look at.

I just went and looked at the CI logs and there are other DownloadWarnings appearing there. We should probably take a look at the tests and make sure we are only downloading necessary files (i.e. we don't need both 50m and 110m geometries for testing things), or consolidate all of the downloads into a setup() call and catch the warnings there.

I'll tackle that in another PR.

@dopplershift dopplershift merged commit 7938dd5 into SciTools:master Aug 3, 2020
@QuLogic
Copy link
Member

QuLogic commented Aug 4, 2020

Closing figures should probably get a cleanup decorator, but really we should add an autouse pytest fixture like Matplotlib does, so we don't need to worry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants