[pypy-svn] r61555 - pypy/trunk/lib-python/modified-2.5.2/test

antocuni at codespeak.net antocuni at codespeak.net
Thu Feb 5 10:35:50 CET 2009


Author: antocuni
Date: Thu Feb  5 10:35:49 2009
New Revision: 61555

Modified:
   pypy/trunk/lib-python/modified-2.5.2/test/test_functools.py
Log:
make test_functools passing



Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_functools.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_functools.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_functools.py	Thu Feb  5 10:35:49 2009
@@ -161,7 +161,8 @@
                       updated=functools.WRAPPER_UPDATES):
         # Check attributes were assigned
         for name in assigned:
-            self.failUnless(getattr(wrapper, name) is getattr(wrapped, name))
+            # the original cpython test compared with 'is', but it's clearly an impl detail
+            self.failUnless(getattr(wrapper, name) == getattr(wrapped, name))
         # Check attributes were updated
         for name in updated:
             wrapper_attr = getattr(wrapper, name)
@@ -218,7 +219,7 @@
             pass
         functools.update_wrapper(wrapper, max)
         self.assertEqual(wrapper.__name__, 'max')
-        self.assert_(wrapper.__doc__.startswith('max('))
+        self.assert_(wrapper.__doc__ == max.__doc__)
 
 class TestWraps(TestUpdateWrapper):
 



More information about the Pypy-commit mailing list