dbcli / dbcli/mssql-cli

Investigate test failure for test_show_function_definition_command

Offen
#345 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: test
Vorherrschende Sprache
Python
Sterne
1.4k
Forks
191
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

macOS build failed on 11/13. Marked as a `test teardown failure`. Stack trace:

```
self =
query = 'DROP DATABASE mssql_cli_db_c6b0809eb4aa45c3b63c44bd22934132;'

def execute_query(self, query):
# Try to run first as special command
try:
> for rows, columns, status, statement, is_error in special.execute(self, query):

mssqlcli/mssqlcliclient.py:95:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

mssqlcliclient =
sql = 'DROP DATABASE mssql_cli_db_c6b0809eb4aa45c3b63c44bd22934132;'

@export
def execute(mssqlcliclient, sql):
"""Execute a special command and return the results. If the special command
is not supported a KeyError will be raised.
"""
command, verbose, pattern = parse_special_command(sql)

if (command not in COMMANDS) and (command.lower() not in COMMANDS):
> raise CommandNotFound('Command not found: %s' % command)
E mssqlcli.packages.special.main.CommandNotFound: Command not found: DROP

mssqlcli/packages/special/main.py:63: CommandNotFound

During handling of the above exception, another exception occurred:

cls =

@classmethod
def tearDownClass(cls):
try:
# delete the database objects created
client = create_mssql_cli_client()
> list(client.execute_query('DROP DATABASE {0};'.format(cls.database)))

tests/test_special.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mssqlcli/mssqlcliclient.py:108: in execute_query
for rows, columns, status, statement, is_error in self._execute_query(single_query):
mssqlcli/mssqlcliclient.py:115: in _execute_query
query_response, query_messages, query_had_error = self._execute_query_execute_request_for(query)
mssqlcli/mssqlcliclient.py:198: in _execute_query_execute_request_for
exit(1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = Use exit() or Ctrl-D (i.e. EOF) to exit, code = 1

def __call__(self, code=None):
# Shells like IDLE catch the SystemExit, but listen when their
# stdin wrapper is closed.
try:
sys.stdin.close()
except:
pass
> raise SystemExit(code)
E SystemExit: 1

.tox/py36/lib/python3.6/site.py:397: SystemExit
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Lies tests/test_special.py sowie Setup und Teardown von test_show_function_definition_command und verfolge anschließend mssqlcli/mssqlcliclient.py bis zu mssqlcli/packages/special/main.py. Reproduziere den macOS-Fehler und bestätige, dass das Teardown ohne die gemeldeten CommandNotFound- und SystemExit-Fehler abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cli, databases, testing-qa
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.