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

Function doctest_tb_verbose

IPython/core/tests/test_iplib.py:90–124  ·  view source on GitHub ↗

In [5]: xmode verbose Exception reporting mode: Verbose In [6]: run simpleerr.py --------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) ... in 30 mode = 'div' 31

()

Source from the content-addressed store, hash-verified

88
89
90def doctest_tb_verbose():
91 """
92In [5]: xmode verbose
93Exception reporting mode: Verbose
94
95In [6]: run simpleerr.py
96---------------------------------------------------------------------------
97ZeroDivisionError Traceback (most recent call last)
98<BLANKLINE>
99... in <module>
100 30 mode = 'div'
101 31
102---> 32 bar(mode)
103 global bar = <function bar at ...>
104 global mode = 'div'
105<BLANKLINE>
106... in bar(mode='div')
107 14 "bar"
108 15 if mode=='div':
109---> 16 div0()
110 global div0 = <function div0 at ...>
111 17 elif mode=='exit':
112 18 try:
113<BLANKLINE>
114... in div0()
115 6 x = 1
116 7 y = 0
117----> 8 x/y
118 x = 1
119 y = 0
120 9
121 10 def sysexit(stat, mode):
122<BLANKLINE>
123ZeroDivisionError: ...
124 """
125
126def doctest_tb_sysexit():
127 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected