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

Function test_plain_maxcolwidth_autowraps

test/test_output.py:104–111  ·  view source on GitHub ↗

Output: maxcolwidth will result in autowrapping longer cells

()

Source from the content-addressed store, hash-verified

102
103
104def test_plain_maxcolwidth_autowraps():
105 "Output: maxcolwidth will result in autowrapping longer cells"
106 table = [["hdr", "fold"], ["1", "very long data"]]
107 expected = "\n".join([" hdr fold", " 1 very long", " data"])
108 result = tabulate(
109 table, headers="firstrow", tablefmt="plain", maxcolwidths=[10, 10]
110 )
111 assert_equal(expected, result)
112
113
114def test_plain_maxcolwidth_autowraps_with_sep():

Callers

nothing calls this directly

Calls 2

tabulateFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected