diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2012-11-14 22:51:44 (GMT) |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2012-11-14 22:51:44 (GMT) |
commit | 8f2b6ad96f15f38593cc68eae2b85390a4bee400 (patch) | |
tree | fa70a40358aa9532652ce5083ce3ae9e148472f3 /Lib/test/test_exceptions.py | |
parent | cc1343140dfc9986a23796ce4e7f0b8c188e11b8 (diff) | |
parent | 21c95ebf7f398a03102e241c5f0fc416857b2529 (diff) | |
download | cpython-8f2b6ad96f15f38593cc68eae2b85390a4bee400.zip cpython-8f2b6ad96f15f38593cc68eae2b85390a4bee400.tar.gz cpython-8f2b6ad96f15f38593cc68eae2b85390a4bee400.tar.bz2 |
merge 3.3
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | 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 index 9696462..e62ed3c 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -7,8 +7,9 @@ import pickle 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 @@ class ExceptionTests(unittest.TestCase): 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 @@ class ExceptionTests(unittest.TestCase): 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 @@ class ExceptionTests(unittest.TestCase): 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) |