MCPcopy Create free account
hub / github.com/ipython/ipython / test_displayobject_repr

Function test_displayobject_repr

IPython/core/tests/test_display.py:217–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215 nt.assert_equal(repr(p), object.__repr__(p))
216
217def test_displayobject_repr():
218 h = display.HTML('<br />')
219 nt.assert_equal(repr(h), '<IPython.core.display.HTML object>')
220 h._show_mem_addr = True
221 nt.assert_equal(repr(h), object.__repr__(h))
222 h._show_mem_addr = False
223 nt.assert_equal(repr(h), '<IPython.core.display.HTML object>')
224
225 j = display.Javascript('')
226 nt.assert_equal(repr(j), '<IPython.core.display.Javascript object>')
227 j._show_mem_addr = True
228 nt.assert_equal(repr(j), object.__repr__(j))
229 j._show_mem_addr = False
230 nt.assert_equal(repr(j), '<IPython.core.display.Javascript object>')
231
232@mock.patch('warnings.warn')
233def test_encourage_iframe_over_html(m_warn):

Callers

nothing calls this directly

Calls 1

__repr__Method · 0.45

Tested by

no test coverage detected