8000
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 ec6014f commit 5c48037Copy full SHA for 5c48037
lib/matplotlib/tests/test_axes.py
@@ -6149,6 +6149,27 @@ def test_pie_get_negative_values():
6149
ax.pie([5, 5, -3], explode=[0, .1, .2])
6150
6151
6152
+def test_pie_invalid_explode():
6153
+ # Test ValueError raised when feeding short explode list to axes.pie
6154
+ fig, ax = plt.subplots()
6155
+ with pytest.raises(ValueError):
6156
+ ax.pie([1, 2, 3], explode=[0.1, 0.1])
6157
+
6158
6159
+def test_pie_invalid_labels():
6160
+ # Test ValueError raised when feeding short labels list to axes.pie
6161
6162
6163
+ ax.pie([1, 2, 3], labels=["One", "Two"])
6164
6165
6166
+def test_pie_invalid_radius():
6167
+ # Test ValueError raised when feeding negative radius to axes.pie
6168
6169
6170
+ ax.pie([1, 2, 3], radius=-5)
6171
6172
6173
def test_normalize_kwarg_pie():
6174
fig, ax = plt.subplots()
6175
x = [0.3, 0.3, 0.1]
0 commit comments