]> granicus.if.org Git - python/commitdiff
Issue #25322: Fix test for nested contextlib.suppress
authorMartin Panter <vadmium+py@gmail.com>
Sat, 10 Oct 2015 11:04:44 +0000 (11:04 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 10 Oct 2015 11:04:44 +0000 (11:04 +0000)
Lib/test/test_contextlib.py

index 8f849ae5604ec52a8c71480c4b6dc4a35a10868b..2669651fba205fdd98c7d7d83b64b93447976f40 100644 (file)
@@ -828,9 +828,11 @@ class TestSuppress(unittest.TestCase):
         with ignore_exceptions:
             len(5)
         with ignore_exceptions:
-            1/0
             with ignore_exceptions: # Check nested usage
                 len(5)
+            outer_continued = True
+            1/0
+        self.assertTrue(outer_continued)
 
 if __name__ == "__main__":
     unittest.main()