summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_getargs2.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-18 18:57:52 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-18 18:57:52 (GMT)
commitad62b03949eca11677fd55df2f8d5f7ef5f504e8 (patch)
tree551fbc324e700f5cb526e2a31c8a5540015aa1a1 /Lib/test/test_getargs2.py
parentc8a16867f69c1a28ee6804bb71d67ac5d82fe4d8 (diff)
downloadcpython-ad62b03949eca11677fd55df2f8d5f7ef5f504e8.zip
cpython-ad62b03949eca11677fd55df2f8d5f7ef5f504e8.tar.gz
cpython-ad62b03949eca11677fd55df2f8d5f7ef5f504e8.tar.bz2
Issue #10451: memoryview objects could allow to mutate a readable buffer.
Initial patch by Ross Lagerwall.
Diffstat (limited to 'Lib/test/test_getargs2.py')
-rw-r--r--Lib/test/test_getargs2.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py
index e8f4fc2..3d9c06a 100644
--- a/Lib/test/test_getargs2.py
+++ b/Lib/test/test_getargs2.py
@@ -381,8 +381,10 @@ class Bytes_TestCase(unittest.TestCase):
self.assertRaises(TypeError, getargs_w_star, 'abc\xe9')
self.assertRaises(TypeError, getargs_w_star, b'bytes')
self.assertRaises(TypeError, getargs_w_star, b'nul:\0')
+ self.assertRaises(TypeError, getargs_w_star, memoryview(b'bytes'))
self.assertEqual(getargs_w_star(bytearray(b'bytearray')), b'[ytearra]')
- self.assertEqual(getargs_w_star(memoryview(b'memoryview')), b'[emoryvie]')
+ self.assertEqual(getargs_w_star(memoryview(bytearray(b'memoryview'))),
+ b'[emoryvie]')
self.assertRaises(TypeError, getargs_w_star, None)