diff options
Diffstat (limited to 'Lib/ctypes/test/test_strings.py')
-rw-r--r-- | Lib/ctypes/test/test_strings.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/ctypes/test/test_strings.py b/Lib/ctypes/test/test_strings.py index 4b58e7ca4f..879c58ab62 100644 --- a/Lib/ctypes/test/test_strings.py +++ b/Lib/ctypes/test/test_strings.py @@ -61,6 +61,13 @@ class StringArrayTestCase(unittest.TestCase): ## print BUF.from_param(c_char_p("python")) ## print BUF.from_param(BUF(*"pyth")) + def test_del_segfault(self): + BUF = c_char * 4 + buf = BUF() + with self.assertRaises(AttributeError): + del buf.raw + + @need_symbol('c_wchar') class WStringArrayTestCase(unittest.TestCase): def test(self): |