MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / test_format_output_live_connection

Method test_format_output_live_connection

tests/test_main.py:56–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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"""

Callers

nothing calls this directly

Calls 3

create_mssql_cliFunction · 0.90
shutdownFunction · 0.90

Tested by

no test coverage detected