From c159e2a1679257a9364718557bf0e997018a8aaf 2014-04-21 23:56:41 From: Jessica B. Hamrick Date: 2014-04-21 23:56:41 Subject: [PATCH] Test against object.__repr__, rather than hardcoded repr --- diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py index d44a249..a1c26d1 100644 --- a/IPython/core/tests/test_display.py +++ b/IPython/core/tests/test_display.py @@ -120,15 +120,13 @@ def test_displayobject_repr(): h = display.HTML('
') nt.assert_equal(repr(h), '') h._show_mem_addr = True - nt.assert_equal( - repr(h), '' % hex(id(h))) + nt.assert_equal(repr(h), object.__repr__(h)) h._show_mem_addr = False nt.assert_equal(repr(h), '') j = display.Javascript('') nt.assert_equal(repr(j), '') j._show_mem_addr = True - nt.assert_equal( - repr(j), '' % hex(id(j))) + nt.assert_equal(repr(j), object.__repr__(j)) j._show_mem_addr = False nt.assert_equal(repr(j), '')