@@ -330,69 +330,71 @@ def function():
330
330
try:
331
331
if something(4):
332
332
break
333
+ elif something(6):
334
+ x = 7
333
335
else:
334
- if something(7 ):
336
+ if something(9 ):
335
337
continue
336
338
else:
337
339
continue
338
- if also_this(11 ):
339
- return 12
340
+ if also_this(13 ):
341
+ return 14
340
342
else:
341
- raise Exception(14 )
343
+ raise Exception(16 )
342
344
finally:
343
- this_thing(16 )
344
- that_thing(17 )
345
+ this_thing(18 )
346
+ that_thing(19 )
345
347
""" )
346
348
if env .PYBEHAVIOR .finally_jumps_back :
347
349
self .assertEqual (
348
- parser .missing_arc_description (16 , 5 ),
349
- "line 16 didn't jump to line 5, because the break on line 5 wasn't executed"
350
+ parser .missing_arc_description (18 , 5 ),
351
+ "line 18 didn't jump to line 5, because the break on line 5 wasn't executed"
350
352
)
351
353
self .assertEqual (
352
- parser .missing_arc_description (5 , 17 ),
353
- "line 5 didn't jump to line 17 , because the break on line 5 wasn't executed"
354
+ parser .missing_arc_description (5 , 19 ),
355
+ "line 5 didn't jump to line 19 , because the break on line 5 wasn't executed"
354
356
)
355
357
self .assertEqual (
356
- parser .missing_arc_description (16 , 8 ),
357
- "line 16 didn't jump to line 8 , because the continue on line 8 wasn't executed"
358
+ parser .missing_arc_description (18 , 10 ),
359
+ "line 18 didn't jump to line 10 , because the continue on line 10 wasn't executed"
358
360
)
359
361
self .assertEqual (
360
- parser .missing_arc_description (8 , 2 ),
361
- "line 8 didn't jump to line 2, because the continue on line 8 wasn't executed"
362
+ parser .missing_arc_description (10 , 2 ),
363
+ "line 10 didn't jump to line 2, because the continue on line 10 wasn't executed"
362
364
)
363
365
self .assertEqual (
364
- parser .missing_arc_description (16 , 12 ),
365
- "line 16 didn't jump to line 12 , because the return on line 12 wasn't executed"
366
+ parser .missing_arc_description (18 , 14 ),
367
+ "line 18 didn't jump to line 14 , because the return on line 14 wasn't executed"
366
368
)
367
369
self .assertEqual (
368
- parser .missing_arc_description (12 , - 1 ),
369
- "line 12 didn't return from function 'function', "
370
- "because the return on line 12 wasn't executed"
370
+ parser .missing_arc_description (14 , - 1 ),
371
+ "line 14 didn't return from function 'function', "
372
+ "because the return on line 14 wasn't executed"
371
373
)
372
374
self .assertEqual (
373
- parser .missing_arc_description (16 , - 1 ),
374
- "line 16 didn't except from function 'function', "
375
- "because the raise on line 14 wasn't executed"
375
+ parser .missing_arc_description (18 , - 1 ),
376
+ "line 18 didn't except from function 'function', "
377
+ "because the raise on line 16 wasn't executed"
376
378
)
377
379
else :
378
380
self .assertEqual (
379
- parser .missing_arc_description (16 , 17 ),
380
- "line 16 didn't jump to line 17 , because the break on line 5 wasn't executed"
381
+ parser .missing_arc_description (18 , 19 ),
382
+ "line 18 didn't jump to line 19 , because the break on line 5 wasn't executed"
381
383
)
382
384
self .assertEqual (
383
- parser .missing_arc_description (16 , 2 ),
384
- "line 16 didn't jump to line 2, "
385
- "because the continue on line 8 wasn't executed"
385
+ parser .missing_arc_description (18 , 2 ),
386
+ "line 18 didn't jump to line 2, "
387
+ "because the continue on line 10 wasn't executed"
386
388
" or "
387
- "the continue on line 10 wasn't executed"
389
+ "the continue on line 12 wasn't executed"
388
390
)
389
391
self .assertEqual (
390
- parser .missing_arc_description (16 , - 1 ),
391
- "line 16 didn't except from function 'function', "
392
- "because the raise on line 14 wasn't executed"
392
+ parser .missing_arc_description (18 , - 1 ),
393
+ "line 18 didn't except from function 'function', "
394
+ "because the raise on line 16 wasn't executed"
393
395
" or "
394
- "line 16 didn't return from function 'function', "
395
- "because the return on line 12 wasn't executed"
396
+ "line 18 didn't return from function 'function', "
397
+ "because the return on line 14 wasn't executed"
396
398
)
397
399
398
400
def test_missing_arc_descriptions_bug460 (self ):
0 commit comments