Show More
@@ -148,7 +148,6 b' ZeroDivisionError Traceback (most recent call last)' | |||
|
148 | 148 | ZeroDivisionError: ... |
|
149 | 149 | """ |
|
150 | 150 | |
|
151 | @py3compat.u_format | |
|
152 | 151 | def doctest_tb_sysexit(): |
|
153 | 152 | """ |
|
154 | 153 | In [17]: %xmode plain |
@@ -156,11 +155,11 b' Exception reporting mode: Plain' | |||
|
156 | 155 | |
|
157 | 156 | In [18]: %run simpleerr.py exit |
|
158 | 157 | An exception has occurred, use %tb to see the full traceback. |
|
159 |
SystemExit: (1, |
|
|
158 | SystemExit: (1, 'Mode = exit') | |
|
160 | 159 | |
|
161 | 160 | In [19]: %run simpleerr.py exit 2 |
|
162 | 161 | An exception has occurred, use %tb to see the full traceback. |
|
163 |
SystemExit: (2, |
|
|
162 | SystemExit: (2, 'Mode = exit') | |
|
164 | 163 | |
|
165 | 164 | In [20]: %tb |
|
166 | 165 | Traceback (most recent call last): |
@@ -170,7 +169,7 b' Traceback (most recent call last):' | |||
|
170 | 169 | sysexit(stat, mode) |
|
171 | 170 | File ... line 11, in sysexit |
|
172 | 171 | raise SystemExit(stat, 'Mode = %s' % mode) |
|
173 |
SystemExit: (2, |
|
|
172 | SystemExit: (2, 'Mode = exit') | |
|
174 | 173 | |
|
175 | 174 | In [21]: %xmode context |
|
176 | 175 | Exception reporting mode: Context |
@@ -198,7 +197,7 b' SystemExit Traceback (most recent call last)' | |||
|
198 | 197 | 12 |
|
199 | 198 | 13 def bar(mode): |
|
200 | 199 | <BLANKLINE> |
|
201 |
SystemExit: (2, |
|
|
200 | SystemExit: (2, 'Mode = exit') | |
|
202 | 201 | |
|
203 | 202 | In [23]: %xmode verbose |
|
204 | 203 | Exception reporting mode: Verbose |
@@ -212,29 +211,29 b' SystemExit Traceback (most recent call last)' | |||
|
212 | 211 | 31 |
|
213 | 212 | ---> 32 bar(mode) |
|
214 | 213 | global bar = <function bar at ...> |
|
215 |
global mode = |
|
|
214 | global mode = 'exit' | |
|
216 | 215 | <BLANKLINE> |
|
217 |
... in bar(mode= |
|
|
216 | ... in bar(mode='exit') | |
|
218 | 217 | 20 except: |
|
219 | 218 | 21 stat = 1 |
|
220 | 219 | ---> 22 sysexit(stat, mode) |
|
221 | 220 | global sysexit = <function sysexit at ...> |
|
222 | 221 | stat = 2 |
|
223 |
mode = |
|
|
222 | mode = 'exit' | |
|
224 | 223 | 23 else: |
|
225 | 224 | 24 raise ValueError('Unknown mode') |
|
226 | 225 | <BLANKLINE> |
|
227 |
... in sysexit(stat=2, mode= |
|
|
226 | ... in sysexit(stat=2, mode='exit') | |
|
228 | 227 | 9 |
|
229 | 228 | 10 def sysexit(stat, mode): |
|
230 | 229 | ---> 11 raise SystemExit(stat, 'Mode = %s' % mode) |
|
231 | 230 | global SystemExit = undefined |
|
232 | 231 | stat = 2 |
|
233 |
mode = |
|
|
232 | mode = 'exit' | |
|
234 | 233 | 12 |
|
235 | 234 | 13 def bar(mode): |
|
236 | 235 | <BLANKLINE> |
|
237 |
SystemExit: (2, |
|
|
236 | SystemExit: (2, 'Mode = exit') | |
|
238 | 237 | """ |
|
239 | 238 | |
|
240 | 239 |
@@ -200,11 +200,11 b' class TestMagicRunSimple(tt.TempFileMixin):' | |||
|
200 | 200 | "%%run '%s' C-third\n") % (tc, tc, tc) |
|
201 | 201 | self.mktmp(src, '.ipy') |
|
202 | 202 | out = """\ |
|
203 |
ARGV 1-: [ |
|
|
204 |
ARGV 1-: [ |
|
|
203 | ARGV 1-: ['C-first'] | |
|
204 | ARGV 1-: ['C-second'] | |
|
205 | 205 | tclass.py: deleting object: C-first |
|
206 |
ARGV 1-: [ |
|
|
206 | ARGV 1-: ['C-third'] | |
|
207 | 207 | tclass.py: deleting object: C-second |
|
208 | 208 | tclass.py: deleting object: C-third |
|
209 | 209 | """ |
|
210 |
tt.ipexec_validate(self.fname, |
|
|
210 | tt.ipexec_validate(self.fname, out) |
General Comments 0
You need to be logged in to leave comments.
Login now