◐ Shell
clean mode source ↗

gh-67565: Add tests for the remove redundant C-contiguity checks by furkanonder · Pull Request #110951 · python/cpython

Thank you Furkan. Were they all conflicts in Argument Clinic generated code?

The only file that creates conflict is test_binascii.py. It seems that the previous test case and my test case created a conflict.

--- 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 tests for C-contiguity checks (GH-110951))
  
  class ArrayBinASCIITest(BinASCIITest):
      def type2test(self, s):