()
| 126 | |
| 127 | |
| 128 | def 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 | |
| 147 | def test_format_output_truncate_off(): |
nothing calls this directly
no test coverage detected