diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2021-07-08 14:05:48 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-07-08 14:37:37 -0400 |
| commit | 809cccb626cead091fdbf187e85322a6fe156ad9 (patch) | |
| tree | c01143eb686763ae0982e52961ec9d951f7e6169 | |
| parent | ab48a7bf66c04754e9964587b2b4f790bb6af8d4 (diff) | |
| download | python-coveragepy-git-809cccb626cead091fdbf187e85322a6fe156ad9.tar.gz | |
test: add a test for #1184.
Note: this test fails on 3.10.0b3, the current 3.10 version in the CI
tests.
| -rw-r--r-- | tests/test_arcs.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index 22446f6a..db756291 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -161,6 +161,23 @@ class SimpleArcTest(CoverageTest): arcz_missing=arcz_missing, ) + def test_bug_1184(self): + self.check_coverage("""\ + def foo(x): + if x: + try: + 1/(x - 1) + except ZeroDivisionError: + pass + return x # 7 + + for i in range(3): # 9 + foo(i) + """, + arcz=".1 19 9-1 .2 23 27 34 47 56 67 7-1 9A A9", + arcz_unpredicted="45", + ) + class WithTest(CoverageTest): """Arc-measuring tests involving context managers.""" |
