Skip to content

Commit ca41280

Browse files
committed
Add column tests
1 parent aa4531a commit ca41280

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/test_heading_cols.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ def test_first_column_heading():
2424
assert text == expected
2525

2626

27+
def test_first_column_heading_body_only():
28+
text = t2a(
29+
body=[["1", "30", "40", "35", "30"], ["2", "30", "40", "35", "30"]],
30+
first_col_heading=True,
31+
)
32+
expected = (
33+
"╔═══╦═══════════════════╗\n"
34+
"║ 1 ║ 30 40 35 30 ║\n"
35+
"║ 2 ║ 30 40 35 30 ║\n"
36+
"╚═══╩═══════════════════╝\n"
37+
)
38+
assert text == expected
39+
40+
2741
def test_last_column_heading():
2842
text = t2a(
2943
header=["#", "G", "H", "R", "S"],
@@ -45,6 +59,20 @@ def test_last_column_heading():
4559
assert text == expected
4660

4761

62+
def test_last_column_heading_body_only():
63+
text = t2a(
64+
body=[["1", "30", "40", "35", "30"], ["2", "30", "40", "35", "30"]],
65+
last_col_heading=True,
66+
)
67+
expected = (
68+
"╔══════════════════╦════╗\n"
69+
"║ 1 30 40 35 ║ 30 ║\n"
70+
"║ 2 30 40 35 ║ 30 ║\n"
71+
"╚══════════════════╩════╝\n"
72+
)
73+
assert text == expected
74+
75+
4876
def test_both_column_heading():
4977
text = t2a(
5078
header=["#", "G", "H", "R", "S"],

0 commit comments

Comments
 (0)