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

Function test_plain_multiline

test/test_output.py:43–56  ·  view source on GitHub ↗

Output: plain with multiline cells with headers

()

Source from the content-addressed store, hash-verified

41
42
43def test_plain_multiline():
44 "Output: plain with multiline cells with headers"
45 table = [[2, "foo\nbar"]]
46 headers = ("more\nspam \x1b[31meggs\x1b[0m", "more spam\n& eggs")
47 expected = "\n".join(
48 [
49 " more more spam",
50 " spam \x1b[31meggs\x1b[0m & eggs",
51 " 2 foo",
52 " bar",
53 ]
54 )
55 result = tabulate(table, headers, tablefmt="plain")
56 assert_equal(expected, result)
57
58
59def test_plain_multiline_with_links():

Callers

nothing calls this directly

Calls 2

tabulateFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected