Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0804eeb commit 1226060Copy full SHA for 1226060
lib/matplotlib/tests/test_artist.py
@@ -333,12 +333,12 @@ def test_set_hover():
333
fig, ax = plt.subplots()
334
im = ax.imshow(np.arange(36).reshape(6, 6)) # non-blank canvasses
335
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
+ im.set_hover(True) # set hover variable to possible values given a figure exists
+ assert im.get_hover()
+ im.set_hover(False)
+ assert not im.get_hover()
+ im.set_hover(None)
+ assert im.get_hover() is None
342
343
im.remove()
344
ln.remove()
0 commit comments