Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ded655a

Browse files
committed
MNT: not all assert methods available in 2.6
Apparently `assert_is`, `assert_in`, and `assert_not_in` are not in the 2.6 version of nose, but are in all others.
1 parent 090b6d6 commit ded655a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/matplotlib/tests/test_artist.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
import matplotlib.collections as mcollections
1515
from matplotlib.testing.decorators import image_comparison, cleanup
1616

17-
from nose.tools import (assert_true, assert_false, assert_is, assert_in,
18-
assert_not_in)
17+
from nose.tools import (assert_true, assert_false)
1918

2019

2120
@cleanup
@@ -159,14 +158,14 @@ def test_remove():
159158
assert_false(fig.stale)
160159
assert_false(ax.stale)
161160

162-
assert_in(im, ax.mouseover_set)
163-
assert_is(im.axes, ax)
161+
assert_true(im in ax.mouseover_set)
162+
assert_true(im.axes is ax)
164163

165164
im.remove()
166165

167-
assert_is(im.axes, None)
168-
assert_is(im.figure, None)
169-
assert_not_in(im, ax.mouseover_set)
166+
assert_true(im.axes is None)
167+
assert_true(im.figure is None)
168+
assert_true(im not in ax.mouseover_set)
170169
assert_true(fig.stale)
171170
assert_true(ax.stale)
172171

0 commit comments

Comments
 (0)