Show More
@@ -116,3 +116,19 def test_set_matplotlib_formats_kwargs(): | |||||
116 | expected.update(cfg.print_figure_kwargs) |
|
116 | expected.update(cfg.print_figure_kwargs) | |
117 | nt.assert_equal(cell, expected) |
|
117 | nt.assert_equal(cell, expected) | |
118 |
|
118 | |||
|
119 | def test_displayobject_repr(): | |||
|
120 | h = display.HTML('<br />') | |||
|
121 | nt.assert_equal(repr(h), '<IPython.core.display.HTML object>') | |||
|
122 | h._show_mem_addr = True | |||
|
123 | nt.assert_equal( | |||
|
124 | repr(h), '<IPython.core.display.HTML object at %s>' % hex(id(h))) | |||
|
125 | h._show_mem_addr = False | |||
|
126 | nt.assert_equal(repr(h), '<IPython.core.display.HTML object>') | |||
|
127 | ||||
|
128 | j = display.Javascript('') | |||
|
129 | nt.assert_equal(repr(j), '<IPython.core.display.Javascript object>') | |||
|
130 | j._show_mem_addr = True | |||
|
131 | nt.assert_equal( | |||
|
132 | repr(j), '<IPython.core.display.Javascript object at %s>' % hex(id(j))) | |||
|
133 | j._show_mem_addr = False | |||
|
134 | nt.assert_equal(repr(j), '<IPython.core.display.Javascript object>') |
General Comments 0
You need to be logged in to leave comments.
Login now