MCPcopy
hub / github.com/dbcli/pgcli / test_invalid_syntax_verbose

Function test_invalid_syntax_verbose

tests/test_pgexecute.py:227–243  ·  view source on GitHub ↗
(executor)

Source from the content-addressed store, hash-verified

225
226@dbtest
227def test_invalid_syntax_verbose(executor):
228 result = run(
229 executor,
230 "invalid syntax!",
231 exception_formatter=lambda x: main_exception_formatter(x, verbose_errors=True),
232 )
233 fields = r"""
234Severity: ERROR
235Severity \(non-localized\): ERROR
236SQLSTATE code: 42601
237Message: syntax error at or near "invalid"
238Position: 1
239File: scan\.l
240Line: \d+
241Routine: scanner_yyerror
242 """.strip()
243 assert re.search(fields, result[0])
244
245
246@dbtest

Callers

nothing calls this directly

Calls 1

runFunction · 0.90

Tested by

no test coverage detected