[pypy-svn] r79730 - pypy/branch/fast-forward/lib-python/modified-2.7.0/test

afa at codespeak.net afa at codespeak.net
Thu Dec 2 00:55:30 CET 2010


Author: afa
Date: Thu Dec  2 00:55:28 2010
New Revision: 79730

Added:
   pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_copy.py
      - copied, changed from r79700, pypy/branch/fast-forward/lib-python/2.7.0/test/test_copy.py
Log:
Some gc_collect() to clear weakrefs and make the tests pass


Copied: pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_copy.py (from r79700, pypy/branch/fast-forward/lib-python/2.7.0/test/test_copy.py)
==============================================================================
--- pypy/branch/fast-forward/lib-python/2.7.0/test/test_copy.py	(original)
+++ pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_copy.py	Thu Dec  2 00:55:28 2010
@@ -637,6 +637,7 @@
         self.assertEqual(v[c], d)
         self.assertEqual(len(v), 2)
         del c, d
+        test_support.gc_collect()
         self.assertEqual(len(v), 1)
         x, y = C(), C()
         # The underlying containers are decoupled
@@ -666,6 +667,7 @@
         self.assertEqual(v[a].i, b.i)
         self.assertEqual(v[c].i, d.i)
         del c
+        test_support.gc_collect()
         self.assertEqual(len(v), 1)
 
     def test_deepcopy_weakvaluedict(self):
@@ -689,6 +691,7 @@
         self.assertTrue(t is d)
         del x, y, z, t
         del d
+        test_support.gc_collect()
         self.assertEqual(len(v), 1)
 
     def test_deepcopy_bound_method(self):



More information about the Pypy-commit mailing list