MCPcopy Index your code
hub / github.com/ipython/ipython / test_multiline_time

Function test_multiline_time

tests/test_magic.py:531–546  ·  view source on GitHub ↗

Make sure last statement from time return a value.

(underscore_not_in_builtins)

Source from the content-addressed store, hash-verified

529
530
531def test_multiline_time(underscore_not_in_builtins):
532 """Make sure last statement from time return a value."""
533 ip = get_ipython()
534 ip.user_ns.pop("run", None)
535
536 ip.run_cell(
537 dedent(
538 """\
539 %%time
540 a = "ho"
541 b = "hey"
542 a+b
543 """
544 )
545 )
546 assert ip.user_ns_hidden["_"] == "hohey"
547
548
549def test_time_local_ns():

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…