From 6345acd01dc3c090aec43aa313ac750999584c4b Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Sat, 27 Feb 2010 01:16:34 -0500 Subject: Add a test for null PyObject* values --- test_gdb.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test_gdb.py') 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') -- cgit