MCPcopy Create free account
hub / github.com/astanin/python-tabulate / test_plain_multiline_with_empty_cells

Function test_plain_multiline_with_empty_cells

test/test_output.py:75–91  ·  view source on GitHub ↗

Output: plain with multiline cells and empty cells with headers

()

Source from the content-addressed store, hash-verified

73
74
75def test_plain_multiline_with_empty_cells():
76 "Output: plain with multiline cells and empty cells with headers"
77 table = [
78 ["hdr", "data", "fold"],
79 ["1", "", ""],
80 ["2", "very long data", "fold\nthis"],
81 ]
82 expected = "\n".join(
83 [
84 " hdr data fold",
85 " 1",
86 " 2 very long data fold",
87 " this",
88 ]
89 )
90 result = tabulate(table, headers="firstrow", tablefmt="plain")
91 assert_equal(expected, result)
92
93
94def test_plain_multiline_with_empty_cells_headerless():

Callers

nothing calls this directly

Calls 2

tabulateFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected