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

Function test_multiline_time

IPython/core/tests/test_magic.py:457–468  ·  view source on GitHub ↗

Make sure last statement from time return a value.

()

Source from the content-addressed store, hash-verified

455 "run += 1")
456
457def test_multiline_time():
458 """Make sure last statement from time return a value."""
459 ip = get_ipython()
460 ip.user_ns.pop('run', None)
461
462 ip.run_cell(dedent("""\
463 %%time
464 a = "ho"
465 b = "hey"
466 a+b
467 """))
468 nt.assert_equal(ip.user_ns_hidden['_'], 'hohey')
469
470def test_time_local_ns():
471 """

Callers

nothing calls this directly

Calls 4

get_ipythonFunction · 0.90
dedentFunction · 0.85
popMethod · 0.80
run_cellMethod · 0.45

Tested by

no test coverage detected