(self)
| 54 | assert list(results) == expected |
| 55 | |
| 56 | def test_format_output_live_connection(self): |
| 57 | statement = u""" |
| 58 | select 1 as [ShiftID], 'Day' as [Name] UNION ALL |
| 59 | select 2, N'魚' UNION ALL |
| 60 | select 3, 'Night' |
| 61 | """ |
| 62 | try: |
| 63 | mssqlcli = create_mssql_cli() |
| 64 | result = self.run_and_return_string_from_formatter(mssqlcli, statement) |
| 65 | expected = [ |
| 66 | u'+-----------+--------+', |
| 67 | u'| ShiftID | Name |', |
| 68 | u'|-----------+--------|', |
| 69 | u'| 1 | Day |', |
| 70 | u'| 2 | 魚 |', |
| 71 | u'| 3 | Night |', |
| 72 | u'+-----------+--------+', |
| 73 | u'(3 rows affected)' |
| 74 | ] |
| 75 | assert list(result) == expected |
| 76 | finally: |
| 77 | shutdown(mssqlcli.mssqlcliclient_main) |
| 78 | |
| 79 | def test_format_output_expanded_live_connection(self): |
| 80 | statement = u""" |
nothing calls this directly
no test coverage detected