Show More
@@ -40,48 +40,48 b' def test_reset():' | |||||
40 |
|
40 | |||
41 | def doctest_tb_plain(): |
|
41 | def doctest_tb_plain(): | |
42 | """ |
|
42 | """ | |
43 | In [18]: xmode plain |
|
43 | In [18]: xmode plain | |
44 | Exception reporting mode: Plain |
|
44 | Exception reporting mode: Plain | |
45 |
|
45 | |||
46 |
|
|
46 | In [19]: run simpleerr.py | |
47 |
|
|
47 | Traceback (most recent call last): | |
48 |
|
|
48 | ...line ..., in <module> | |
49 |
|
|
49 | bar(mode) | |
50 |
|
|
50 | ...line ..., in bar | |
51 |
|
|
51 | div0() | |
52 |
|
|
52 | ...line ..., in div0 | |
53 |
|
|
53 | x/y | |
54 |
|
|
54 | ZeroDivisionError: ... | |
55 | """ |
|
55 | """ | |
56 |
|
56 | |||
57 |
|
57 | |||
58 | def doctest_tb_context(): |
|
58 | def doctest_tb_context(): | |
59 | """ |
|
59 | """ | |
60 | In [3]: xmode context |
|
60 | In [3]: xmode context | |
61 | Exception reporting mode: Context |
|
61 | Exception reporting mode: Context | |
62 |
|
62 | |||
63 |
|
|
63 | In [4]: run simpleerr.py | |
64 |
|
|
64 | --------------------------------------------------------------------------- | |
65 |
|
|
65 | ZeroDivisionError Traceback (most recent call last) | |
66 |
|
|
66 | <BLANKLINE> | |
67 |
|
|
67 | ... in <module> | |
68 |
|
|
68 | 30 except IndexError: | |
69 |
|
|
69 | 31 mode = 'div' | |
70 |
|
|
70 | ---> 33 bar(mode) | |
71 |
|
|
71 | <BLANKLINE> | |
72 |
|
|
72 | ... in bar(mode) | |
73 |
|
|
73 | 15 "bar" | |
74 |
|
|
74 | 16 if mode=='div': | |
75 |
|
|
75 | ---> 17 div0() | |
76 |
|
|
76 | 18 elif mode=='exit': | |
77 |
|
|
77 | 19 try: | |
78 |
|
|
78 | <BLANKLINE> | |
79 |
|
|
79 | ... in div0() | |
80 |
|
|
80 | 6 x = 1 | |
81 |
|
|
81 | 7 y = 0 | |
82 |
|
|
82 | ----> 8 x/y | |
83 |
|
|
83 | <BLANKLINE> | |
84 |
|
|
84 | ZeroDivisionError: ...""" | |
85 |
|
85 | |||
86 |
|
86 | |||
87 | def doctest_tb_verbose(): |
|
87 | def doctest_tb_verbose(): |
General Comments 0
You need to be logged in to leave comments.
Login now