Skip to content

Add vega deprecations to tests on master #7987

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

Merged
merged 2 commits into from
Jan 30, 2017

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jan 30, 2017

The merge up broke this. Sorry about that.

@QuLogic QuLogic added this to the 2.1 (next point release) milestone Jan 30, 2017
@NelleV NelleV changed the title Add vega deprecations to tests on master [MRG+1] Add vega deprecations to tests on master Jan 30, 2017
@tacaswell tacaswell merged commit 87885e7 into matplotlib:master Jan 30, 2017
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter('always')
cmap = plt.get_cmap(name)
assert len(w) == (1 if name in should_have_warning else 0)
Copy link
Member

Choose a reason for hiding this comment

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

How about adding some more data in the AssertionError message if this doesn't match? Something like

assert len(w) == (1 if name in should_have_warning else 0), (name, [wg.message for wg in w])

would help the next person who wants to debug why this assertion is failing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, name is already available though the parametrization and will be printed as part of the test name. Pytest also prints out w, but unfortunately using the repr which doesn't look that great for warnings, so maybe adding that to the message wouldn't be a bad idea.

@QuLogic QuLogic changed the title [MRG+1] Add vega deprecations to tests on master Add vega deprecations to tests on master Jan 30, 2017
@QuLogic QuLogic deleted the master-Vega-deprecation branch January 30, 2017 21:19
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.

4 participants