mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
#3946 fix PyObject_CheckBuffer on a memoryview object
reviewed by Antoine
This commit is contained in:
parent
8a1b689e85
commit
60320cb3e4
3 changed files with 6 additions and 3 deletions
|
@ -242,6 +242,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
compile(source='pass', filename='?', mode='exec')
|
||||
compile(dont_inherit=0, filename='tmp', source='0', mode='eval')
|
||||
compile('pass', '?', dont_inherit=1, mode='exec')
|
||||
compile(memoryview(b"text"), "name", "exec")
|
||||
self.assertRaises(TypeError, compile)
|
||||
self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'badmode')
|
||||
self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'single', 0xff)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue