[pypy-svn] r28947 - pypy/dist/pypy/interpreter/test

hpk at codespeak.net hpk at codespeak.net
Mon Jun 19 14:38:22 CEST 2006


Author: hpk
Date: Mon Jun 19 14:38:21 2006
New Revision: 28947

Modified:
   pypy/dist/pypy/interpreter/test/test_function.py
Log:
assume oldstyle if no _oldstyle builtin metaclass is found


Modified: pypy/dist/pypy/interpreter/test/test_function.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/test_function.py	(original)
+++ pypy/dist/pypy/interpreter/test/test_function.py	Mon Jun 19 14:38:21 2006
@@ -222,7 +222,10 @@
         assert repr(A.f) == "<unbound method A.f>"
         assert repr(A().f).startswith("<bound method A.f of <") 
         class B:
-            __metaclass__ = _classobj
+            try:
+                __metaclass__ = _classobj
+            except NameError: # non-pypy, assuming oldstyle implicitely
+                pass
             def f(self):
                 pass
         assert repr(B.f) == "<unbound method B.f>"



More information about the Pypy-commit mailing list