MCPcopy
hub / github.com/dbcli/pgcli / test_format_output

Function test_format_output

tests/test_main.py:62–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def test_format_output():
63 settings = OutputSettings(table_format="psql", dcmlfmt="d", floatfmt="g")
64 results = format_output("Title", [("abc", "def")], ["head1", "head2"], "test status", settings)
65 expected = [
66 "Title",
67 "+-------+-------+",
68 "| head1 | head2 |",
69 "|-------+-------|",
70 "| abc | def |",
71 "+-------+-------+",
72 "test status",
73 ]
74 assert list(results) == expected
75
76
77def test_column_date_formats():

Callers

nothing calls this directly

Calls 1

format_outputFunction · 0.90

Tested by

no test coverage detected