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

Skip to content

Commit 1226060

Browse files
committed
modified test to fit current yc-task2 spec
1 parent 0804eeb commit 1226060

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/matplotlib/tests/test_artist.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,12 @@ def test_set_hover():
333333
fig, ax = plt.subplots()
334334
im = ax.imshow(np.arange(36).reshape(6, 6)) # non-blank canvasses
335335
ln, = ax.plot(range(5))
336-
im.set_hover(True)
337-
assert im.get_hover() == True
338-
im.set_hover(1.0)
339-
assert ln.get_hover() == 1.0
340-
ln.set_hover(art.__str__)
341-
assert ln.get_hover() is not None
336+
im.set_hover(True) # set hover variable to possible values given a figure exists
337+
assert im.get_hover()
338+
im.set_hover(False)
339+
assert not im.get_hover()
340+
im.set_hover(None)
341+
assert im.get_hover() is None
342342

343343
im.remove()
344344
ln.remove()

0 commit comments

Comments
 (0)