We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 675415b commit d6e919cCopy full SHA for d6e919c
pandas/tests/io/formats/test_to_excel.py
@@ -6,6 +6,8 @@
6
7
import pytest
8
9
+import pandas.util._test_decorators as td
10
+
11
import pandas._testing as tm
12
13
from pandas.io.formats.css import CSSWarning
@@ -320,3 +322,12 @@ def tests_css_named_colors_valid():
320
322
upper_hexs = set(map(str.upper, string.hexdigits))
321
323
for color in CSSToExcelConverter.NAMED_COLORS.values():
324
assert len(color) == 6 and all(c in upper_hexs for c in color)
325
326
327
+@td.skip_if_no_mpl
328
+def test_css_named_colors_from_mpl_present():
329
+ from matplotlib.colors import CSS4_COLORS as mpl_colors
330
331
+ pd_colors = CSSToExcelConverter.NAMED_COLORS
332
+ for name, color in mpl_colors.items():
333
+ assert name in pd_colors and pd_colors[name] == color[1:]
0 commit comments