diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-02-24 20:50:49 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-02-24 20:50:49 (GMT) |
commit | 5bffa79c227236a8bfde6bf174a1f3f0a43fd2ea (patch) | |
tree | c755754b167f2c992e610dab9a6dfe7c6ff59511 /Lib | |
parent | 1ce92dc20d698ce46c3459da7801c76bb8518550 (diff) | |
download | cpython-5bffa79c227236a8bfde6bf174a1f3f0a43fd2ea.zip cpython-5bffa79c227236a8bfde6bf174a1f3f0a43fd2ea.tar.gz cpython-5bffa79c227236a8bfde6bf174a1f3f0a43fd2ea.tar.bz2 |
Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
a buffer struct having a NULL data pointer.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_capi.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 32f8fae..529a2a5 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -50,6 +50,8 @@ class CAPITest(unittest.TestCase): b'Fatal Python error:' b' PyThreadState_Get: no current thread') + def test_memoryview_from_NULL_pointer(self): + self.assertRaises(ValueError, _testcapi.make_memoryview_from_NULL_pointer) @unittest.skipUnless(threading, 'Threading required for this test.') class TestPendingCalls(unittest.TestCase): |