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

Function doctest_refbug

IPython/core/tests/test_run.py:38–55  ·  view source on GitHub ↗

Very nasty problem with references held by multiple runs of a script. See: https://github.com/ipython/ipython/issues/141 In [1]: _ip.clear_main_mod_cache() # random In [2]: %run refbug In [3]: call_f() lowercased: hello In [4]: %run refbug In [5]: call_f() lo

()

Source from the content-addressed store, hash-verified

36from IPython.core import debugger
37
38def doctest_refbug():
39 """Very nasty problem with references held by multiple runs of a script.
40 See: https://github.com/ipython/ipython/issues/141
41
42 In [1]: _ip.clear_main_mod_cache()
43 # random
44
45 In [2]: %run refbug
46
47 In [3]: call_f()
48 lowercased: hello
49
50 In [4]: %run refbug
51
52 In [5]: call_f()
53 lowercased: hello
54 lowercased: hello
55 """
56
57
58def doctest_run_builtins():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected