-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Escape both bytes and unicode strings for "ids" in Metafunc.parametrize #1470
Conversation
@ceridwen could you please solve the conflict? Sorry about that, it must have been another merge that happened earlier. |
I solved the conflict. I haven't changed the tests yet. Is my proposed resolution acceptable? I'm planning to repurpose test_unicode_idval_python to check for escaping. Should I change any of the other nearby tests to check for escaping? Should I write a Hypothesis test for this code? I'm willing to use my own judgment here, but I don't want to trip up anyone else in doing so. If you want me to decide, tell me. |
@ceridwen thanks! I tried your print(_escape_strings(b'bytes-ascii'))
print(_escape_strings(u'unicode-ascii'))
print(_escape_strings(u'unicode-non-ascii:☺'))
print(_escape_strings(b'\xe7-bytes')) Here's what I get for Python 2:
And for Python 3:
My original contribution on that part of the code was meant to show unicode ascii strings as ascii in the terminal instead of hiding them in a generic variable name, so this looks nice to me. 😉
Seems reasonable! 👍
I'm 👍 on this, but would like to hear other's opinion too. Just in case, you should probably make that in a separate commit (in this same PR) in case anyone is 👎 Thanks again for all your work! |
I'm always 👍 for hypothesis! (Honestly, it's awesome. You think your stuff is well tested, spend 5 minutes throwing some hypothesis at it, and it finds bugs you never thought about) |
…ted string handling on Python 3
I have a new test failure related to escaping on Python 3:
Should I change the assertion to match or do something else? |
You should change the test, the new behavior is to escape non-ascii chars. 😁 |
I don't know what to do with the tests that are failing to import Hypothesis or what's wrong with the format I used in CHANGELOG.rst. Someone is going to have to tell me what to do here. |
Hi @ceridwen,
I don't know how other core contributors track PR progress, but I rely on e-mail notifications which (unfortunately) are not triggered by new commits, that might be the reason why nobody commented on your changes until now. Sorry about that. |
I changed the dependencies and the changelog. The fact that commits don't trigger email notifications is a real annoyance for me. |
Yep, BitBucket does, not sure why GitHub doesn't. There are merge conflicts, could you please rebase your branch on |
Also |
Is there anything else? |
Looks great, thanks! 👍 I will merge this tomorrow unless someone still wants to comment on something. 😁 |
Thanks again @ceridwen for the work and patience! |
well done |
@ceridwen @nicoddemus FWIW I asked GitHub support about getting mails on PR updates, and they said they recorded it in their internal feature request tracker. I can't imagine I'm the first one to request that, but oh well... 😉 |
You're welcome, all. I do wish that Github allowed updating pull requests, having the discussion for a pull request like this one in three separate threads (one issue, two pull requests) is annoying. I'm sorry for anyone who has to come read back through this discussion. Btw, someone should close the associated issue, #1351. |
This is the new version of #1463 based on the features branch.