-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-535152 Updated regex to also include the old error code #1298
Conversation
test/integ/test_errors.py
Outdated
@@ -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})\): " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this would be more precise:
rf"^({syntax_errno:06d}|{syntax_errno_old:06d}) \(({syntax_sqlstate}|{syntax_sqlstate_old})\): " | |
rf"^({syntax_errno_old:06d} \({syntax_sqlstate_old}\)|{syntax_errno:06d} \({syntax_sqlstate}\)): ": |
Codecov Report
@@ Coverage Diff @@
## main #1298 +/- ##
==========================================
+ Coverage 81.49% 81.52% +0.02%
==========================================
Files 59 59
Lines 8562 8562
Branches 1275 1275
==========================================
+ Hits 6978 6980 +2
+ Misses 1277 1275 -2
Partials 307 307
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🚢
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes broken test from 1297
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Forgot to update regex, regex is now updated