Don't fail tests on harmless changes to dependencies
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Wed, 26 Aug 2020 21:34:50 +0000 (22:34 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Wed, 26 Aug 2020 21:34:50 +0000 (22:34 +0100)
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 <rebecca_palmer@zoho.com>
Forwarded: accepted https://github.com/pandas-dev/pandas/pull/33262

Gbp-Pq: Name matplotlib32_compat.patch

pandas/tests/plotting/test_frame.py

index 1c429bafa9a19f7c83fd8e02eb564e6443c7c7f2..ba6582126ca8424dd65f1e061ece1355a3417159 100644 (file)
@@ -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)