summaryrefslogtreecommitdiffstats
path: root/test_gdb.py
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2010-02-27 01:16:34 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2010-02-27 01:16:34 -0500
commit6345acd01dc3c090aec43aa313ac750999584c4b (patch)
tree1df117b5b0056833c77d1269a29908bf78f65386 /test_gdb.py
parent18d4855f7baee27c3f7941e3d092d00951830298 (diff)
downloadlibpython-6345acd01dc3c090aec43aa313ac750999584c4b.zip
libpython-6345acd01dc3c090aec43aa313ac750999584c4b.tar.gz
libpython-6345acd01dc3c090aec43aa313ac750999584c4b.tar.xz
Add a test for null PyObject* values
Diffstat (limited to 'test_gdb.py')
-rw-r--r--test_gdb.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test_gdb.py b/test_gdb.py
index d7cd237..82cef5d 100644
--- a/test_gdb.py
+++ b/test_gdb.py
@@ -191,6 +191,11 @@ print foo''')
'Unexpected gdb representation: %r\n%s' % \
(gdb_repr, gdb_output))
+ def test_NULL_ptr(self):
+ 'Ensure that a NULL PyObject* is handled gracefully'
+ self.assertSane('print 42',
+ 'set variable op=0')
+
def test_NULL_ob_type(self):
self.assertSane('print 42',
'set op->ob_type=0')