[Python-checkins] cpython (merge 3.4 -> 3.5): Issue #25322: Merge contextlib.suppress test fix from 3.4 into 3.5

martin.panter python-checkins at python.org
Sat Oct 10 07:10:37 EDT 2015


https://hg.python.org/cpython/rev/836ac579e179
changeset:   98647:836ac579e179
branch:      3.5
parent:      98643:be34d96e2184
parent:      98646:452f76cbebdd
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Oct 10 11:05:47 2015 +0000
summary:
  Issue #25322: Merge contextlib.suppress test fix from 3.4 into 3.5

files:
  Lib/test/test_contextlib.py |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_contextlib.py b/Lib/test/test_contextlib.py
--- a/Lib/test/test_contextlib.py
+++ b/Lib/test/test_contextlib.py
@@ -880,9 +880,11 @@
         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()

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list