X Tutup
Skip to content

TST: Clean up figure tests#7765

Merged
NelleV merged 2 commits intomatplotlib:masterfrom
dstansby:figure-test-clean
Jan 11, 2017
Merged

TST: Clean up figure tests#7765
NelleV merged 2 commits intomatplotlib:masterfrom
dstansby:figure-test-clean

Conversation

@dstansby
Copy link
Copy Markdown
Member

@dstansby dstansby commented Jan 8, 2017

Add a couple of @cleanup decorators, and catch a newish warning. This gets rid of a couple of warnings from the tests.

@dstansby dstansby changed the title Clean up figure test Clean up figure tests Jan 8, 2017
@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jan 8, 2017
@tacaswell tacaswell changed the title Clean up figure tests [MRG+1] TST: Clean up figure tests Jan 8, 2017
# the final request for a polar axes will end up creating one
# with a spec of 111.
assert_true(fig.gca(polar=True) is not ax3)
with warnings.catch_warnings(record=True) as w:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Within this context, you also need a warnings.simplefilter('always') or else the warning may not be triggered.

assert_equal(len(fig.axes), 3)


@cleanup
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Contrary to its documentation, plt.figaspect doesn't actually create a new figure, so this shouldn't affect anything.

@codecov-io
Copy link
Copy Markdown

Current coverage is 62.12% (diff: 100%)

Merging #7765 into master will not change coverage

@@             master      #7765   diff @@
==========================================
  Files           174        174          
  Lines         56028      56028          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          34805      34805          
  Misses        21223      21223          
  Partials          0          0          

Powered by Codecov. Last update 115bade...8de6aab

Copy link
Copy Markdown
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

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

Thanks!

@NelleV NelleV merged commit 3f7dad4 into matplotlib:master Jan 11, 2017
@QuLogic QuLogic changed the title [MRG+1] TST: Clean up figure tests TST: Clean up figure tests Jan 15, 2017
@dstansby dstansby deleted the figure-test-clean branch January 22, 2017 13:56
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.

5 participants

X Tutup