We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fddad86 commit 331f66bCopy full SHA for 331f66b
tests/test_coverage.py
@@ -368,6 +368,16 @@ def test_raise(self):
368
""",
369
[1,2,5,6], "")
370
371
+ def test_raise_followed_by_statement(self):
372
+ self.check_coverage("""\
373
+ try:
374
+ raise Exception("hello")
375
+ a = 3
376
+ except:
377
+ pass
378
+ """,
379
+ [1,2,3,4,5], "3")
380
+
381
def test_return(self):
382
self.check_coverage("""\
383
def fn():
@@ -401,6 +411,18 @@ def fn():
401
411
402
412
[1,2,3,7,8], "")
403
413
414
+ def test_return_followed_by_statement(self):
415
416
+ def fn():
417
+ a = 1
418
+ return a
419
+ a = 2
420
421
+ x = fn()
422
+ assert(x == 1)
423
424
+ [1,2,3,4,6,7], "4")
425
404
426
def test_yield(self):
405
427
406
428
def gen():
0 commit comments