-
Notifications
You must be signed in to change notification settings - Fork 311
Fixes #185 #259
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
base: master
Are you sure you want to change the base?
Fixes #185 #259
Conversation
tests/test_utils.py
Outdated
|
||
def test_unicode_characters_in_query(): | ||
res = substitute_params("testing ascii (ąčę) 1=%d 'one'=%s", (1, 'str')) | ||
eq_(res, b"testing ascii (\xc4\x85\xc4\x8d\xc4\x99) 1=1 'one'=N'one'") |
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.
The test case proposed by the PR can't be successfull as currently written.
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.
@ramiro Could you explain me, why it won't work?
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.
@nagyv Because AFAICT there is no N'one
literal and there is nowhere it can be extracted or interpolated from.
Running the full, test suite shows the change introduces four test failures elsewhere. Also, a PEP 0263 encoding comment needs to be added to the modified test file. |
@nagyv: Do you want to take a shot at updating this and getting the tests to pass? |
I would like to get the tests fixed, but can't run travis myself as I don't have any mssql servers to connect to. Could you share with me in a private message the value of "PYMSSQL_TEST_DATABASE" in tox.ini? |
This fix eliminates unnecessary encoding-unicode switching.