156
156
"border-top-style: solid; border-top-width: 4pt" ,
157
157
{"border" : {"top" : {"style" : "thick" }}},
158
158
),
159
- (
159
+ (
160
160
"border-top-style: solid; border-top-width: none" ,
161
161
{"border" : {"top" : {"style" : "none" }}},
162
162
),
206
206
"border-top-style: slantDashDot; border-top-color: blue" ,
207
207
{"border" : {"top" : {"style" : "slantDashDot" , "color" : "0000FF" }}},
208
208
),
209
-
210
-
211
209
# ALIGNMENT
212
210
# - horizontal
213
211
("text-align: center" , {"alignment" : {"horizontal" : "center" }}),
@@ -270,7 +268,6 @@ def test_css_to_excel_multiple():
270
268
"border-style: another-unhandled-style" ,
271
269
],
272
270
)
273
-
274
271
def test_css_to_excel_unhandled_border_style_warns (css ):
275
272
"""Test that unhandled border styles raise a CSSWarning."""
276
273
convert = CSSToExcelConverter ()
@@ -358,6 +355,7 @@ def test_css_to_excel_bad_colors(input_color):
358
355
convert = CSSToExcelConverter ()
359
356
assert expected == convert (css )
360
357
358
+
361
359
@pytest .mark .parametrize ("input_color" , ["#" , "#1234567" ])
362
360
def test_css_to_excel_invalid_color_raises (input_color ):
363
361
"""Test that invalid colors raise a ValueError."""
@@ -374,6 +372,7 @@ def test_css_to_excel_invalid_color_raises(input_color):
374
372
with pytest .raises (ValueError , match = f"Unexpected color { input_color } " ):
375
373
convert (css )
376
374
375
+
377
376
def tests_css_named_colors_valid ():
378
377
upper_hexs = set (map (str .upper , string .hexdigits ))
379
378
for color in CSSToExcelConverter .NAMED_COLORS .values ():
0 commit comments