summaryrefslogtreecommitdiff
path: root/tests/test_arcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r--tests/test_arcs.py26
1 files changed, 23 insertions, 3 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py
index f3c5fc34..f09af8c1 100644
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -172,9 +172,9 @@ if sys.version_info >= (2, 6):
self.check_coverage("""\
for i in range(2):
with open("test", "w") as f:
- print 3
- print 4
- print 5
+ print(3)
+ print(4)
+ print(5)
""",
arcz=".1 12 23 34 41 15 5."
)
@@ -510,6 +510,26 @@ class ExceptionArcTest(CoverageTest):
arcz=".1 12 23 35 56 61 17 7.",
arcz_missing="", arcz_unpredicted="")
+ def test_bug_212(self):
+ self.check_coverage("""\
+ def b(exc):
+ try:
+ while True:
+ raise Exception(exc)
+ except Exception as e:
+ if e.args != ('expected',):
+ raise e
+ q = 1
+
+ b('expected')
+ try:
+ b('unexpected')
+ except:
+ pass
+ """,
+ arcz=".1 .2 1A 23 34 56 67 68 8. 85 AB BC C. DE E.",
+ arcz_missing="")
+
if sys.version_info >= (2, 5):
# Try-except-finally was new in 2.5
def test_except_finally(self):