[pypy-svn] r51183 - pypy/dist/pypy/translator/cli/test

antocuni at codespeak.net antocuni at codespeak.net
Fri Feb 1 15:17:05 CET 2008


Author: antocuni
Date: Fri Feb  1 15:17:05 2008
New Revision: 51183

Modified:
   pypy/dist/pypy/translator/cli/test/test_dotnet.py
Log:
fix test to work also when interpreted



Modified: pypy/dist/pypy/translator/cli/test/test_dotnet.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/test_dotnet.py	(original)
+++ pypy/dist/pypy/translator/cli/test/test_dotnet.py	Fri Feb  1 15:17:05 2008
@@ -469,9 +469,7 @@
 
     def test_dynamic_method(self):
         from pypy.rpython.ootypesystem import ootype
-        self._skip_pythonnet("does not work")
         DelegateType = CLR.pypy.runtime.DelegateType_int__int_int
-        DELEGATETYPE = DelegateType._INSTANCE
         Utils = CLR.pypy.runtime.Utils
         def fn():
             tInt = typeof(System.Int32)
@@ -483,7 +481,7 @@
             il.Emit(OpCodes.Add)
             il.Emit(OpCodes.Ret)
             myfunc = meth.CreateDelegate(typeof(DelegateType))
-            myfunc = ootype.oodowncast(DELEGATETYPE, myfunc) # XXX messy
+            myfunc = clidowncast(DelegateType, myfunc)
             return myfunc.Invoke(30, 12)
         res = self.interpret(fn, [])
         assert res == 42



More information about the Pypy-commit mailing list