Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
TST: Clean up figure tests #7765
+7
−3
Conversation
dstansby
changed the title from
Clean up figure test to Clean up figure tests
Jan 8, 2017
tacaswell
added this to the
2.1 (next point release)
milestone
Jan 8, 2017
tacaswell
added the
Testing
label
Jan 8, 2017
tacaswell
changed the title from
Clean up figure tests to [MRG+1] TST: Clean up figure tests
Jan 8, 2017
| @@ -83,7 +84,10 @@ def test_gca(): | ||
| # 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: |
QuLogic
Jan 8, 2017
Member
Within this context, you also need a warnings.simplefilter('always') or else the warning may not be triggered.
| @@ -205,6 +208,7 @@ def test_axes_remove(): | ||
| assert_equal(len(fig.axes), 3) | ||
| +@cleanup |
QuLogic
Jan 8, 2017
Member
Contrary to its documentation, plt.figaspect doesn't actually create a new figure, so this shouldn't affect anything.
codecov-io
commented
Jan 9, 2017
Current coverage is 62.12% (diff: 100%)@@ 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
|
NelleV
merged commit 3f7dad4
into matplotlib:master
Jan 11, 2017
5 checks passed
codecov/patch
Coverage not affected when comparing 115bade...8de6aab
Details
codecov/project
62.12% (+0.00%) compared to 115bade
Details
continuous-integration/appveyor/pr
AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
coverage/coveralls
Coverage remained the same at 62.121%
Details
QuLogic
changed the title from
[MRG+1] TST: Clean up figure tests to TST: Clean up figure tests
Jan 15, 2017
dstansby
deleted the
dstansby:figure-test-clean branch
Jan 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dstansby commentedJan 8, 2017
Add a couple of
@cleanupdecorators, and catch a newish warning. This gets rid of a couple of warnings from the tests.