(err, xycoords, match)
| 259 | (ValueError, "axes foo", "'foo' is not a recognized unit"), |
| 260 | )) |
| 261 | def test_annotate_errors(err, xycoords, match): |
| 262 | fig, ax = plt.subplots() |
| 263 | with pytest.raises(err, match=match): |
| 264 | ax.annotate('xy', (0, 0), xytext=(0.5, 0.5), xycoords=xycoords) |
| 265 | fig.canvas.draw() |
| 266 | |
| 267 | |
| 268 | @image_comparison(['titles'], style='mpl20') |