()
| 33 | |
| 34 | @staticmethod |
| 35 | def test_format_output(): |
| 36 | mssqlcli = create_mssql_cli() |
| 37 | settings = OutputSettings(table_format='psql', dcmlfmt='d', floatfmt='g') |
| 38 | results = mssqlcli.format_output( |
| 39 | 'Title', |
| 40 | [('abc', 'def')], |
| 41 | ['head1', 'head2'], |
| 42 | 'test status', |
| 43 | settings |
| 44 | ) |
| 45 | expected = [ |
| 46 | 'Title', |
| 47 | '+---------+---------+', |
| 48 | '| head1 | head2 |', |
| 49 | '|---------+---------|', |
| 50 | '| abc | def |', |
| 51 | '+---------+---------+', |
| 52 | 'test status' |
| 53 | ] |
| 54 | assert list(results) == expected |
| 55 | |
| 56 | def test_format_output_live_connection(self): |
| 57 | statement = u""" |
nothing calls this directly
no test coverage detected