We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c70bfe commit 49ae371Copy full SHA for 49ae371
Lib/test/test_capi/test_abstract.py
@@ -343,6 +343,13 @@ def test_copy_to_object(self):
343
s1 = _testcapi.object_copy_to_object(bytes(5), 'abcde', 'C')
344
s2 = _testcapi.object_copy_to_object(bytes(5), 'abcde', 'F')
345
s3 = _testcapi.object_copy_to_object(bytes(5), 'abcde', 'A')
346
+ try:
347
+ _testcapi.object_copy_to_object(bytes(4), 'abcde', 'A')
348
+ _testcapi.object_copy_to_object(list(), 'abcde', 'A')
349
+ except BufferError as e:
350
+ self.assertIsInstance(e, BufferError)
351
+ except TypeError as e:
352
+ self.assertIsInstance(e, TypeError)
353
self.assertEqual(s1, s2)
354
self.assertEqual(s2, s3)
355
self.assertEqual(s1, s3)
0 commit comments