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

Method command

tests/test_special.py:149–165  ·  view source on GitHub ↗
(self, command, pattern, min_rows_expected, rows_expected_pattern_query,
                cols_expected, cols_expected_verbose)

Source from the content-addressed store, hash-verified

147 self.assertTrue(len(ret) == 0)
148
149 def command(self, command, pattern, min_rows_expected, rows_expected_pattern_query,
150 cols_expected, cols_expected_verbose):
151 # pylint: disable=too-many-arguments
152 try:
153 client = create_mssql_cli_client()
154
155 for rows, col, _, _, _ in client.execute_query(command):
156 self.assertTrue(len(rows) >= min_rows_expected)
157 self.assertTrue(len(col) == cols_expected)
158
159 # execute with pattern and verbose
160 command = command + "+ " + pattern
161 for rows, col, _, _, _ in client.execute_query(command):
162 self.assertTrue(len(rows) == rows_expected_pattern_query)
163 self.assertTrue(len(col) == cols_expected_verbose)
164 finally:
165 shutdown(client)
166
167
168if __name__ == u'__main__':

Calls 3

create_mssql_cli_clientFunction · 0.90
shutdownFunction · 0.90
execute_queryMethod · 0.45

Tested by

no test coverage detected