Skip to content

Commit

Permalink
Updated regex to also include the old error code
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jaliu committed Oct 25, 2022
1 parent e57b217 commit f31ee9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/integ/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def test_error_code(conn_cnx):
e.value.sqlstate == syntax_sqlstate
or e.value.sqlstate == syntax_sqlstate_old
), "Syntax SQL state"
e.match(rf"^{syntax_errno:06d} \({syntax_sqlstate}\): ")
e.match(
rf"^({syntax_errno:06d}|{syntax_errno_old:06d}) \(({syntax_sqlstate}|{syntax_sqlstate_old})\): "
)


@pytest.mark.skipolddriver
Expand Down

0 comments on commit f31ee9e

Please sign in to comment.