MCPcopy Index your code
hub / github.com/dbcli/pgcli / test_format_output_truncate_on

Function test_format_output_truncate_on

tests/test_main.py:128–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127
128def test_format_output_truncate_on():
129 settings = OutputSettings(table_format="psql", dcmlfmt="d", floatfmt="g", max_field_width=10)
130 results = format_output(
131 None,
132 [("first field value", "second field value")],
133 ["head1", "head2"],
134 None,
135 settings,
136 )
137 expected = [
138 "+------------+------------+",
139 "| head1 | head2 |",
140 "|------------+------------|",
141 "| first f... | second ... |",
142 "+------------+------------+",
143 ]
144 assert list(results) == expected
145
146
147def test_format_output_truncate_off():

Callers

nothing calls this directly

Calls 1

format_outputFunction · 0.90

Tested by

no test coverage detected