Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r88724:865fcea6b0e0
Date: 2016-11-29 10:01 +0100
http://bitbucket.org/pypy/pypy/changeset/865fcea6b0e0/

Log:    fix tests

diff --git a/lib-python/3/unittest/test/test_assertions.py 
b/lib-python/3/unittest/test/test_assertions.py
--- a/lib-python/3/unittest/test/test_assertions.py
+++ b/lib-python/3/unittest/test/test_assertions.py
@@ -2,6 +2,7 @@
 import warnings
 import weakref
 import unittest
+from test.support import gc_collect
 from itertools import product
 
 
@@ -124,8 +125,10 @@
                     self.foo()
 
         Foo("test_functional").run()
+        gc_collect()
         self.assertIsNone(wr())
         Foo("test_with").run()
+        gc_collect()
         self.assertIsNone(wr())
 
     def testAssertNotRegex(self):
diff --git a/lib-python/3/unittest/test/test_case.py 
b/lib-python/3/unittest/test/test_case.py
--- a/lib-python/3/unittest/test/test_case.py
+++ b/lib-python/3/unittest/test/test_case.py
@@ -18,7 +18,7 @@
     TestEquality, TestHashing, LoggingResult, LegacyLoggingResult,
     ResultWithNoStartTestRunStopTestRun
 )
-from test.support import captured_stderr
+from test.support import captured_stderr, gc_collect
 
 
 log_foo = logging.getLogger('foo')
@@ -1737,6 +1737,7 @@
         for method_name in ('test1', 'test2'):
             testcase = TestCase(method_name)
             testcase.run()
+            gc_collect()
             self.assertEqual(MyException.ninstance, 0)
 
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to