Kaydet (Commit) 75559aff authored tarafından Martin Panter's avatar Martin Panter

Issue #25498: Update error message for 3.5

üst 0da4ac1f
...@@ -44,7 +44,7 @@ class Test(unittest.TestCase): ...@@ -44,7 +44,7 @@ class Test(unittest.TestCase):
(c_char * 16).from_buffer(memoryview(b"a" * 16)) (c_char * 16).from_buffer(memoryview(b"a" * 16))
with self.assertRaisesRegex(TypeError, "not C contiguous"): with self.assertRaisesRegex(TypeError, "not C contiguous"):
(c_char * 16).from_buffer(memoryview(bytearray(b"a" * 16))[::-1]) (c_char * 16).from_buffer(memoryview(bytearray(b"a" * 16))[::-1])
msg = "does not have the buffer interface" msg = "bytes-like object is required"
with self.assertRaisesRegex(TypeError, msg): with self.assertRaisesRegex(TypeError, msg):
(c_char * 16).from_buffer("a" * 16) (c_char * 16).from_buffer("a" * 16)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment