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

Function test_display_available

IPython/core/tests/test_display.py:191–207  ·  view source on GitHub ↗

Test that display is available without import We don't really care if it's in builtin or anything else, but it should always be available.

()

Source from the content-addressed store, hash-verified

189 nt.assert_equal(cell, expected)
190
191def test_display_available():
192 """
193 Test that display is available without import
194
195 We don't really care if it's in builtin or anything else, but it should
196 always be available.
197 """
198 ip = get_ipython()
199 with AssertNotPrints('NameError'):
200 ip.run_cell('display')
201 try:
202 ip.run_cell('del display')
203 except NameError:
204 pass # it's ok, it might be in builtins
205 # even if deleted it should be back
206 with AssertNotPrints('NameError'):
207 ip.run_cell('display')
208
209def test_textdisplayobj_pretty_repr():
210 p = display.Pretty("This is a simple test")

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
AssertNotPrintsClass · 0.90
run_cellMethod · 0.45

Tested by

no test coverage detected