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

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


https://hg.python.org/cpython/rev/c601496c2829
changeset:   98648:c601496c2829
parent:      98644:fe87a6f9caa7
parent:      98647:836ac579e179
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Oct 10 11:06:05 2015 +0000
summary:
  Issue #25322: Merge contextlib.suppress test fix from 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