()
| 6914 | |
| 6915 | |
| 6916 | def test_pie_label_fail(): |
| 6917 | sizes = 15, 30, 45, 10 |
| 6918 | labels = 'Frogs', 'Hogs' |
| 6919 | fig, ax = plt.subplots() |
| 6920 | pie = ax.pie(sizes) |
| 6921 | |
| 6922 | match = re.escape("The number of labels (2) must match the number of wedges (4)") |
| 6923 | with pytest.raises(ValueError, match=match): |
| 6924 | ax.pie_label(pie, labels) |
| 6925 | |
| 6926 | |
| 6927 | @image_comparison(['set_get_ticklabels.png'], style='mpl20', |