Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Use fig, ax = plt.subplots() in tests#18553
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
I am hesitant to make too many changes to the tests (as we don't have tests on the tests) in general, but not hesitant enough to reject this change.
Travis passed, even though it is 'waiting' twice. |
That's fair. OTOH test code should be concise. And it may serve as a reference for users, which is why we should not use outdated or uncommon ideoms there. IMHO a careful cleanup is advisable. |
PR Summary
Use
instead of
The latter was a common pattern in tests. The former is shorter and thus adds less clutter to the tests.
More similar patterns could be replaced, but that's for another time.
Also fixed here along the way:
plt.errorbar
instead ofax.errorbar
- we should test using the OOP API unless we want to test pyplot specifically.