@@ -215,24 +215,40 @@ def test_nested_loop(self):
215
215
)
216
216
217
217
def test_break (self ):
218
+ if env .PYBEHAVIOR .omit_after_jump :
219
+ arcz = ".1 12 23 35 15 5."
220
+ arcz_missing = "15"
221
+ else :
222
+ arcz = ".1 12 23 35 15 41 5."
223
+ arcz_missing = "15 41"
224
+
218
225
self .check_coverage ("""\
219
226
for i in range(10):
220
227
a = i
221
228
break # 3
222
229
a = 99
223
230
assert a == 0 # 5
224
231
""" ,
225
- arcz = ".1 12 23 35 15 41 5." , arcz_missing = "15 41" )
232
+ arcz = arcz , arcz_missing = arcz_missing
233
+ )
226
234
227
235
def test_continue (self ):
236
+ if env .PYBEHAVIOR .omit_after_jump :
237
+ arcz = ".1 12 23 31 15 5."
238
+ arcz_missing = ""
239
+ else :
240
+ arcz = ".1 12 23 31 15 41 5."
241
+ arcz_missing = "41"
242
+
228
243
self .check_coverage ("""\
229
244
for i in range(10):
230
245
a = i
231
246
continue # 3
232
247
a = 99
233
248
assert a == 9 # 5
234
249
""" ,
235
- arcz = ".1 12 23 31 15 41 5." , arcz_missing = "41" )
250
+ arcz = arcz , arcz_missing = arcz_missing
251
+ )
236
252
237
253
def test_nested_breaks (self ):
238
254
self .check_coverage ("""\
@@ -495,6 +511,14 @@ def test_try_except(self):
495
511
assert a == 3 and b == 1
496
512
""" ,
497
513
arcz = ".1 12 23 36 45 56 6." , arcz_missing = "45 56" )
514
+
515
+ def test_raise_followed_by_statement (self ):
516
+ if env .PYBEHAVIOR .omit_after_jump :
517
+ arcz = ".1 12 23 34 46 67 78 8."
518
+ arcz_missing = ""
519
+ else :
520
+ arcz = ".1 12 23 34 46 58 67 78 8."
521
+ arcz_missing = "58"
498
522
self .check_coverage ("""\
499
523
a, b = 1, 1
500
524
try:
@@ -505,8 +529,7 @@ def test_try_except(self):
505
529
b = 7
506
530
assert a == 3 and b == 7
507
531
""" ,
508
- arcz = ".1 12 23 34 46 58 67 78 8." ,
509
- arcz_missing = "58" ,
532
+ arcz = arcz , arcz_missing = arcz_missing ,
510
533
)
511
534
512
535
def test_hidden_raise (self ):
@@ -579,15 +602,15 @@ def test_try_finally(self):
579
602
try:
580
603
a = 4
581
604
raise Exception("Yikes!")
582
- a = 6
605
+ # line 6
583
606
finally:
584
607
c = 8
585
608
except:
586
609
d = 10 # A
587
610
assert a == 4 and c == 8 and d == 10 # B
588
611
""" ,
589
- arcz = ".1 12 23 34 45 58 68 89 8B 9A AB B." ,
590
- arcz_missing = "68 8B " ,
612
+ arcz = ".1 12 23 34 45 58 89 9A AB B." ,
613
+ arcz_missing = "" ,
591
614
)
592
615
593
616
def test_finally_in_loop (self ):
0 commit comments