Skip to content

TST: don't assert that matplotlib rejects shorthand hex colors #33262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions pandas/tests/plotting/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2041,12 +2041,6 @@ def test_line_colors(self):
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"]
Expand Down Expand Up @@ -2098,14 +2092,6 @@ def test_line_colors_and_styles_subplots(self):
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)
Expand Down