Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-67565: Add tests for the remove redundant C-contiguity checks#110951
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
serhiy-storchaka left a comment
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.
LGTM.
Thanks@furkanonder for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry,@furkanonder and@serhiy-storchaka, I could not cleanly backport this to |
Sorry,@furkanonder and@serhiy-storchaka, I could not cleanly backport this to |
(cherry picked from commit9376728)
GH-111198 is a backport of this pull request to the3.12 branch. |
GH-111199 is a backport of this pull request to the3.11 branch. |
furkanonder commentedOct 23, 2023
@serhiy-storchaka The bot couldn't backport the changes because of the conflicts. I opened it manually. Can you merge these PRs? |
serhiy-storchaka commentedOct 23, 2023
Thank you Furkan. Were they all conflicts in Argument Clinic generated code? |
furkanonder commentedOct 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The only file that creates conflict is --- a/Lib/test/test_binascii.py+++ b/Lib/test/test_binascii.py@@@ -428,6 -465,21 +428,24 @@@ class BinASCIITest(unittest.TestCase) self.assertEqual(binascii.b2a_base64(b, newline=False), b'aGVsbG8=') ++<<<<<<< HEAD++=======+ @hypothesis.given(+ binary=hypothesis.strategies.binary(),+ newline=hypothesis.strategies.booleans(),+ )+ def test_base64_roundtrip(self, binary, newline):+ converted = binascii.b2a_base64(self.type2test(binary), newline=newline)+ restored = binascii.a2b_base64(self.type2test(converted))+ self.assertConversion(binary, converted, restored, newline=newline)+ + def test_c_contiguity(self):+ m = memoryview(bytearray(b'noncontig'))+ noncontig_writable = m[::-2]+ with self.assertRaises(BufferError):+ binascii.b2a_hex(noncontig_writable)+ ++>>>>>>> 9376728ce4 (gh-67565: Add testsfor C-contiguity checks (GH-110951)) class ArrayBinASCIITest(BinASCIITest): def type2test(self, s): |
Uh oh!
There was an error while loading.Please reload this page.