Skip to content

Commit dda3c97

Browse files
Debian Science Teamrebecca-palmer
Debian Science Team
authored andcommitted
Don't fail tests on harmless changes to dependencies
Don't assert that matplotlib rejects shorthand hex colors, as 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 Author: Rebecca N. Palmer <[email protected]> Forwarded: accepted pandas-dev/pandas#33262 Gbp-Pq: Name matplotlib32_compat.patch
1 parent cc93c9d commit dda3c97

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
@@ -2036,12 +2036,6 @@ def test_line_colors(self):
20362036
self._check_colors(ax.get_lines(), linecolors=custom_colors)
20372037
tm.close()
20382038

2039-
with pytest.raises(ValueError):
2040-
# Color contains shorthand hex value results in ValueError
2041-
custom_colors = ["#F00", "#00F", "#FF0", "#000", "#FFF"]
2042-
# Forced show plot
2043-
_check_plot_works(df.plot, color=custom_colors)
2044-
20452039
@pytest.mark.slow
20462040
def test_dont_modify_colors(self):
20472041
colors = ["r", "g", "b"]
@@ -2093,14 +2087,6 @@ def test_line_colors_and_styles_subplots(self):
20932087
self._check_colors(ax.get_lines(), linecolors=[c])
20942088
tm.close()
20952089

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

0 commit comments

Comments
 (0)