(data, text)
| 455 | ([[0, 0]], "[0.00]"), |
| 456 | ]) |
| 457 | def test_format_cursor_data(data, text): |
| 458 | from matplotlib.backend_bases import MouseEvent |
| 459 | |
| 460 | fig, ax = plt.subplots() |
| 461 | im = ax.imshow(data) |
| 462 | |
| 463 | xdisp, ydisp = ax.transData.transform([0, 0]) |
| 464 | event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp) |
| 465 | assert im.format_cursor_data(im.get_cursor_data(event)) == text |
| 466 | |
| 467 | |
| 468 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…