Skip to content

Commit 31a1c04

Browse files
committed
Update test_column_widths.py
1 parent 04f25a9 commit 31a1c04

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_column_widths.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,15 @@ def test_negative_column_widths():
4747
last_col_heading=True,
4848
column_widths=[7, 5, 5, 5, -1],
4949
)
50+
51+
52+
def test_column_width_less_than_size():
53+
with pytest.raises(ValueError):
54+
t2a(
55+
header=["Wide Column", "Another Wide Column", "H", "R", "S"],
56+
body=[["1", "30", "40", "35", "30"], ["2", "30", "40", "35", "30"]],
57+
footer=["TOTL", "130", "140", "135", "130"],
58+
first_col_heading=True,
59+
last_col_heading=True,
60+
column_widths=[5, 3, 3, 3, 3],
61+
)

0 commit comments

Comments
 (0)