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

Method test_format_output_expanded_live_connection

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

Source from the content-addressed store, hash-verified

77 shutdown(mssqlcli.mssqlcliclient_main)
78
79 def test_format_output_expanded_live_connection(self):
80 statement = u"""
81 select N'配列' as [Name] UNION ALL
82 select 'Evening' UNION ALL
83 select 'Night'
84 """
85
86 try:
87 mssqlcli = create_mssql_cli()
88 result = self.run_and_return_string_from_formatter(mssqlcli, statement, expanded=True)
89 expected = [
90 '-[ RECORD 1 ]-------------------------',
91 'Name | 配列',
92 '-[ RECORD 2 ]-------------------------',
93 'Name | Evening',
94 '-[ RECORD 3 ]-------------------------',
95 'Name | Night',
96 '(3 rows affected)'
97 ]
98 assert list(result) == expected
99 finally:
100 shutdown(mssqlcli.mssqlcliclient_main)
101
102 @staticmethod
103 def test_format_output_auto_expand():

Callers

nothing calls this directly

Calls 3

create_mssql_cliFunction · 0.90
shutdownFunction · 0.90

Tested by

no test coverage detected