[pypy-svn] rev 1040 - pypy/trunk/src/pypy/interpreter/test

gvanrossum at codespeak.net gvanrossum at codespeak.net
Tue Jun 24 13:50:45 CEST 2003


Author: gvanrossum
Date: Tue Jun 24 13:50:45 2003
New Revision: 1040

Modified:
   pypy/trunk/src/pypy/interpreter/test/test_extmodule.py
Log:
Repair test_appmethod, which looked pretty bogus.

Modified: pypy/trunk/src/pypy/interpreter/test/test_extmodule.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/test/test_extmodule.py	(original)
+++ pypy/trunk/src/pypy/interpreter/test/test_extmodule.py	Tue Jun 24 13:50:45 2003
@@ -43,15 +43,11 @@
         bm = BM_with_appmethod(space)
         w_bm = bm.wrap_me()
         w_bmd = space.getattr(w_bm, space.wrap('__dict__'))
-        bmd = space.unwrap(w_bmd)
-        themethod = bmd.get('amethod')
-        self.assertNotEqual(themethod, None)
         w_method = space.getitem(w_bmd, space.wrap('amethod'))
-        bmd['amethod'] = BM_with_appmethod.amethod
-        self.assertEqual(bmd,
-            {'__doc__': BM_with_appmethod.__doc__,
-            '__name__': BM_with_appmethod.__pythonname__,
-            'amethod': BM_with_appmethod.amethod} )
+        w_doc = space.getitem(w_bmd, space.wrap("__doc__"))
+        w_name = space.getitem(w_bmd, space.wrap("__name__"))
+        self.assertEqual(space.unwrap(w_doc), BM_with_appmethod.__doc__)
+        self.assertEqual(space.unwrap(w_name), BM_with_appmethod.__pythonname__)
         result = space.call(w_method, space.wrap(()), space.wrap({}))
         self.assertEqual(result, 23)
 


More information about the Pypy-commit mailing list