In [3]: xmode context Exception reporting mode: Context In [4]: run simpleerr.py --------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) ... in 30 mode = 'div' 31
()
| 56 | |
| 57 | |
| 58 | def doctest_tb_context(): |
| 59 | """ |
| 60 | In [3]: xmode context |
| 61 | Exception reporting mode: Context |
| 62 | |
| 63 | In [4]: run simpleerr.py |
| 64 | --------------------------------------------------------------------------- |
| 65 | ZeroDivisionError Traceback (most recent call last) |
| 66 | <BLANKLINE> |
| 67 | ... in <module> |
| 68 | 30 mode = 'div' |
| 69 | 31 |
| 70 | ---> 32 bar(mode) |
| 71 | <BLANKLINE> |
| 72 | ... in bar(mode) |
| 73 | 14 "bar" |
| 74 | 15 if mode=='div': |
| 75 | ---> 16 div0() |
| 76 | 17 elif mode=='exit': |
| 77 | 18 try: |
| 78 | <BLANKLINE> |
| 79 | ... in div0() |
| 80 | 6 x = 1 |
| 81 | 7 y = 0 |
| 82 | ----> 8 x/y |
| 83 | 9 |
| 84 | 10 def sysexit(stat, mode): |
| 85 | <BLANKLINE> |
| 86 | ZeroDivisionError: ... |
| 87 | """ |
| 88 | |
| 89 | |
| 90 | def doctest_tb_verbose(): |
nothing calls this directly
no outgoing calls
no test coverage detected