(executor)
| 225 | |
| 226 | @dbtest |
| 227 | def 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""" |
| 234 | Severity: ERROR |
| 235 | Severity \(non-localized\): ERROR |
| 236 | SQLSTATE code: 42601 |
| 237 | Message: syntax error at or near "invalid" |
| 238 | Position: 1 |
| 239 | File: scan\.l |
| 240 | Line: \d+ |
| 241 | Routine: scanner_yyerror |
| 242 | """.strip() |
| 243 | assert re.search(fields, result[0]) |
| 244 | |
| 245 | |
| 246 | @dbtest |