From a2f3acee0bf8a4d9f7b0ed91205aefd4b17472ee 2012-12-16 22:23:21 From: Bradley M. Froehle Date: 2012-12-16 22:23:21 Subject: [PATCH] Add test for gh-2684. --- diff --git a/IPython/lib/tests/test_pretty.py b/IPython/lib/tests/test_pretty.py index 3c5a0a4..817616c 100644 --- a/IPython/lib/tests/test_pretty.py +++ b/IPython/lib/tests/test_pretty.py @@ -18,6 +18,7 @@ import nose.tools as nt # Our own imports from IPython.lib import pretty +from IPython.testing.decorators import skip_without #----------------------------------------------------------------------------- # Classes and functions @@ -82,3 +83,12 @@ def test_callability_checking(): expectedoutput = "Dummy1(...)" nt.assert_equal(gotoutput, expectedoutput) + +@skip_without('xxlimited') +def test_pprint_heap_allocated_type(): + """ + Test that pprint works for heap allocated types. + """ + import xxlimited + output = pretty.pretty(xxlimited.Null) + nt.assert_equal(output, 'xxlimited.Null')