From dda3c97daf6f8e55e32ee605f6a1ebf5131f7366 Mon Sep 17 00:00:00 2001 From: Debian Science Team Date: Wed, 26 Aug 2020 22:34:50 +0100 Subject: [PATCH] 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 Forwarded: accepted https://github.com/pandas-dev/pandas/pull/33262 Gbp-Pq: Name matplotlib32_compat.patch --- pandas/tests/plotting/test_frame.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pandas/tests/plotting/test_frame.py b/pandas/tests/plotting/test_frame.py index 1c429baf..ba658212 100644 --- a/pandas/tests/plotting/test_frame.py +++ b/pandas/tests/plotting/test_frame.py @@ -2036,12 +2036,6 @@ class TestDataFramePlots(TestPlotBase): self._check_colors(ax.get_lines(), linecolors=custom_colors) tm.close() - with pytest.raises(ValueError): - # Color contains shorthand hex value results in ValueError - custom_colors = ["#F00", "#00F", "#FF0", "#000", "#FFF"] - # Forced show plot - _check_plot_works(df.plot, color=custom_colors) - @pytest.mark.slow def test_dont_modify_colors(self): colors = ["r", "g", "b"] @@ -2093,14 +2087,6 @@ class TestDataFramePlots(TestPlotBase): self._check_colors(ax.get_lines(), linecolors=[c]) tm.close() - with pytest.raises(ValueError): - # Color contains shorthand hex value results in ValueError - custom_colors = ["#F00", "#00F", "#FF0", "#000", "#FFF"] - # Forced show plot - # _check_plot_works adds an ax so catch warning. see GH #13188 - with tm.assert_produces_warning(UserWarning): - _check_plot_works(df.plot, color=custom_colors, subplots=True) - rgba_colors = [cm.jet(n) for n in np.linspace(0, 1, len(df))] for cmap in ["jet", cm.jet]: axes = df.plot(colormap=cmap, subplots=True) -- 2.30.2