[Python-checkins] cpython (merge 3.3 -> default): merge 3.3

philip.jenvey python-checkins at python.org
Wed Nov 14 23:50:10 CET 2012


http://hg.python.org/cpython/rev/0b70b4ca7b6f
changeset:   80438:0b70b4ca7b6f
parent:      80435:7f0a2932706f
parent:      80437:d00d1e3587e3
user:        Philip Jenvey <pjenvey at underboss.org>
date:        Wed Nov 14 14:51:44 2012 -0800
summary:
  merge 3.3

files:
  Lib/test/test_exceptions.py |  15 ++++++++++-----
  1 files changed, 10 insertions(+), 5 deletions(-)


diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -7,8 +7,9 @@
 import weakref
 import errno
 
-from test.support import (TESTFN, unlink, run_unittest, captured_output,
-                          check_warnings, gc_collect, cpython_only, no_tracing)
+from test.support import (TESTFN, captured_output, check_impl_detail,
+                          check_warnings, cpython_only, gc_collect, run_unittest,
+                          no_tracing, unlink)
 
 class NaiveException(Exception):
     def __init__(self, x):
@@ -551,7 +552,9 @@
             e.__context__ = None
             obj = None
             obj = wr()
-            gc_collect()
+            # guarantee no ref cycles on CPython (don't gc_collect)
+            if check_impl_detail(cpython=False):
+                gc_collect()
             self.assertTrue(obj is None, "%s" % obj)
 
         # Some complicated construct
@@ -568,7 +571,8 @@
             except MyException:
                 pass
         obj = None
-        gc_collect()
+        if check_impl_detail(cpython=False):
+            gc_collect()
         obj = wr()
         self.assertTrue(obj is None, "%s" % obj)
 
@@ -583,7 +587,8 @@
         with Context():
             inner_raising_func()
         obj = None
-        gc_collect()
+        if check_impl_detail(cpython=False):
+            gc_collect()
         obj = wr()
         self.assertTrue(obj is None, "%s" % obj)
 

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


More information about the Python-checkins mailing list