Blank separator columns (E, U) carry no header fill 🟩

This commit is contained in:
Daniel Roth 2026-05-15 15:42:24 +00:00
parent a078578122
commit 2801756e56

View file

@ -302,3 +302,18 @@ def test_write_data_rows_places_door_data_at_cols_22_to_25() -> None:
assert ws.cell(row=3, column=23).value == 762.0
assert ws.cell(row=3, column=28).value is None
assert ws.cell(row=3, column=29).value is None
def test_write_headers_blank_separator_columns_have_no_fill() -> None:
# Arrange
wb = openpyxl.Workbook()
ws = wb.active # type: ignore[assignment]
# Act
_write_headers(ws)
# Assert — cols 5 (E) and 21 (U) have no fill in either header row
for col in (5, 21):
for row in (1, 2):
fill = ws.cell(row=row, column=col).fill
assert fill.patternType is None, f"col {col} row {row} should have no fill"