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

Suppress warning in animation test #4330

Merged
merged 4 commits into from
Sep 23, 2021

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Sep 20, 2021

🚀 Pull Request

Description

Occasionally we get test failures because assertWarns finds a warning about animation deletion when it is expecting something else, in tests that have nothing to do with animation. Running this single test module prior to this change shows that the warning is thrown here. I thought it might be worth suppressing it, but obviously I have no way to check whether it will cure the problem of interfering with other tests, as it only happens sporadically.

Worth a try?


Consult Iris pull request check list

@rcomer
Copy link
Member Author

rcomer commented Sep 21, 2021

Another option might be to modify the _draw_was_started attribute before the test method returns.

https://github.com/matplotlib/matplotlib/blob/2b15797272f53215b65b37424d34535ff43777fd/lib/matplotlib/animation.py#L887-L895

@bjlittle
Copy link
Member

Another option might be to modify the _draw_was_started attribute before the test method returns.

@rcomer Did you want to give that a try instead?

@bjlittle bjlittle self-assigned this Sep 23, 2021
@rcomer
Copy link
Member Author

rcomer commented Sep 23, 2021

@bjlittle yeah, I was leaning towards that too. How's this? I can confirm that the warning is not thrown when I just run the one test module.

@bjlittle bjlittle self-requested a review September 23, 2021 13:27
Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

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

@rcomer LGTM. Awesome thanks 🍻

@bjlittle bjlittle merged commit d210ebf into SciTools:main Sep 23, 2021
@rcomer rcomer deleted the suppress-animation-warning branch September 23, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants