MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_pie_label_fail

Function test_pie_label_fail

lib/matplotlib/tests/test_axes.py:6916–6924  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6914
6915
6916def 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',

Callers

nothing calls this directly

Calls 3

pieMethod · 0.80
pie_labelMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…