[pypy-svn] r63080 - pypy/trunk/pypy/lib/app_test

pedronis at codespeak.net pedronis at codespeak.net
Thu Mar 19 16:02:27 CET 2009


Author: pedronis
Date: Thu Mar 19 16:02:26 2009
New Revision: 63080

Modified:
   pypy/trunk/pypy/lib/app_test/test_functools.py
Log:
(iko, pedronis)

applying the same fixes from lib-python/modified-2.5.2/ to the app_test variant of test_functools.py



Modified: pypy/trunk/pypy/lib/app_test/test_functools.py
==============================================================================
--- pypy/trunk/pypy/lib/app_test/test_functools.py	(original)
+++ pypy/trunk/pypy/lib/app_test/test_functools.py	Thu Mar 19 16:02:26 2009
@@ -122,7 +122,7 @@
         p = self.thetype(hex)
         try:
             del p.__dict__
-        except TypeError:
+        except (TypeError, AttributeError):
             pass
         else:
             raise AssertionError, 'partial object allowed __dict__ to be deleted'
@@ -132,6 +132,8 @@
         p = proxy(f)
         assert f.func == p.func
         f = None
+        import gc
+        gc.collect()
         py.test.raises(ReferenceError, getattr, p, 'func')
 
     def test_with_bound_and_unbound_methods(self):
@@ -217,7 +219,7 @@
             pass
         functools.update_wrapper(wrapper, max)
         assert wrapper.__name__ == 'max'
-        assert wrapper.__doc__.startswith('max(')
+        assert wrapper.__doc__ == max.__doc__
 
 class TestWraps(TestUpdateWrapper):
 



More information about the Pypy-commit mailing list