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

Function test_underscore_no_overwrite_user

tests/test_displayhook.py:33–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32
33def test_underscore_no_overwrite_user():
34 ip.run_cell("_ = 42", store_history=True)
35 ip.run_cell("1+1", store_history=True)
36
37 with AssertPrints("42"):
38 ip.run_cell("print(_)", store_history=True)
39
40 ip.run_cell("del _", store_history=True)
41 ip.run_cell("6+6", store_history=True)
42 with AssertPrints("12"):
43 ip.run_cell("_", store_history=True)
44
45
46def test_underscore_no_overwrite_builtins():

Callers

nothing calls this directly

Calls 2

AssertPrintsClass · 0.90
run_cellMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…