[pypy-svn] r35094 - pypy/dist/pypy/interpreter

rxe at codespeak.net rxe at codespeak.net
Tue Nov 28 20:58:00 CET 2006


Author: rxe
Date: Tue Nov 28 20:57:33 2006
New Revision: 35094

Modified:
   pypy/dist/pypy/interpreter/mixedmodule.py
Log:
un-hardcode path

Modified: pypy/dist/pypy/interpreter/mixedmodule.py
==============================================================================
--- pypy/dist/pypy/interpreter/mixedmodule.py	(original)
+++ pypy/dist/pypy/interpreter/mixedmodule.py	Tue Nov 28 20:57:33 2006
@@ -193,7 +193,7 @@
 # ____________________________________________________________
 # Helper to test mixed modules on top of CPython
 
-def testmodule(name):
+def testmodule(name, basepath='pypy.module'):
     """Helper to test mixed modules on top of CPython,
     running with the CPy Object Space.  The module should behave
     more or less as if it had been compiled, either with the
@@ -204,7 +204,8 @@
     import sys, new
     from pypy.objspace.cpy.objspace import CPyObjSpace
     space = CPyObjSpace()
-    fullname = "pypy.module.%s" % name 
+    
+    fullname = "%s.%s" % (basepath, name) 
     Module = __import__(fullname, 
                         None, None, ["Module"]).Module
     if Module.applevel_name is not None:



More information about the Pypy-commit mailing list