Skip to content

Commit 37b14e5

Browse files
TST: don't assert that matplotlib rejects shorthand hex colors (#33262)
From 3.2 it accepts them: https://matplotlib.org/users/prev_whats_new/whats_new_3.2.0.html#digit-and-4-digit-hex-colors
1 parent 7b032ec commit 37b14e5

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

pandas/tests/plotting/test_frame.py

-14
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,6 @@ def test_line_colors(self):
20412041
self._check_colors(ax.get_lines(), linecolors=custom_colors)
20422042
tm.close()
20432043

2044-
with pytest.raises(ValueError):
2045-
# Color contains shorthand hex value results in ValueError
2046-
custom_colors = ["#F00", "#00F", "#FF0", "#000", "#FFF"]
2047-
# Forced show plot
2048-
_check_plot_works(df.plot, color=custom_colors)
2049-
20502044
@pytest.mark.slow
20512045
def test_dont_modify_colors(self):
20522046
colors = ["r", "g", "b"]
@@ -2098,14 +2092,6 @@ def test_line_colors_and_styles_subplots(self):
20982092
self._check_colors(ax.get_lines(), linecolors=[c])
20992093
tm.close()
21002094

2101-
with pytest.raises(ValueError):
2102-
# Color contains shorthand hex value results in ValueError
2103-
custom_colors = ["#F00", "#00F", "#FF0", "#000", "#FFF"]
2104-
# Forced show plot
2105-
# _check_plot_works adds an ax so catch warning. see GH #13188
2106-
with tm.assert_produces_warning(UserWarning):
2107-
_check_plot_works(df.plot, color=custom_colors, subplots=True)
2108-
21092095
rgba_colors = [cm.jet(n) for n in np.linspace(0, 1, len(df))]
21102096
for cmap in ["jet", cm.jet]:
21112097
axes = df.plot(colormap=cmap, subplots=True)

0 commit comments

Comments
 (0)