[pypy-svn] r34269 - pypy/dist/pypy

fijal at codespeak.net fijal at codespeak.net
Mon Nov 6 16:06:14 CET 2006


Author: fijal
Date: Mon Nov  6 16:06:13 2006
New Revision: 34269

Modified:
   pypy/dist/pypy/conftest.py
Log:
Added possibility of creating objspace with keyword options for app-level tests.


Modified: pypy/dist/pypy/conftest.py
==============================================================================
--- pypy/dist/pypy/conftest.py	(original)
+++ pypy/dist/pypy/conftest.py	Mon Nov  6 16:06:13 2006
@@ -83,8 +83,13 @@
 
 class TinyObjSpace(object):
     def __init__(self, **kwds):
-        if kwds:
-            py.test.skip("cannot runappdirect test: space needs %s" % (kwds,))
+        import sys
+        for key, val in kwds.iteritems():
+            has = sys.pypy_translation_info.get(key, None)
+            if has != value:
+                py.test.skip("cannot runappdirect test: space needs %s = %s, "\
+                    "while pypy-c was built with %s" % (key, value, has))
+
     def appexec(self, args, body):
         src = py.code.Source("def anonymous" + body)
         d = {}



More information about the Pypy-commit mailing list