Skip to content

Commit 210c06e

Browse files
committed
TST: make applicable to mpl version >= 3.3
1 parent 1ced494 commit 210c06e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pandas/tests/plotting/test_frame.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,11 +2650,20 @@ def test_pie_df(self):
26502650
self._check_colors(ax.patches, facecolors=color_args)
26512651

26522652
def test_pie_df_nan(self):
2653+
import matplotlib as mpl
2654+
26532655
df = DataFrame(np.random.rand(4, 4))
26542656
for i in range(4):
26552657
df.iloc[i, i] = np.nan
26562658
fig, axes = self.plt.subplots(ncols=4)
2657-
df.plot.pie(subplots=True, ax=axes, legend=True, normalize=True)
2659+
2660+
# GH 37668
2661+
if mpl.__version__ >= "3.3":
2662+
kwargs = {"normalize": True}
2663+
else:
2664+
kwargs = {}
2665+
2666+
df.plot.pie(subplots=True, ax=axes, legend=True, **kwargs)
26582667

26592668
base_expected = ["0", "1", "2", "3"]
26602669
for i, ax in enumerate(axes):

0 commit comments

Comments
 (0)