[pypy-svn] r15555 - in pypy/dist: lib-python pypy

nik at codespeak.net nik at codespeak.net
Wed Aug 3 15:50:14 CEST 2005


Author: nik
Date: Wed Aug  3 15:50:12 2005
New Revision: 15555

Modified:
   pypy/dist/lib-python/conftest.py
   pypy/dist/pypy/conftest.py
Log:
added --usemodules option to py.test


Modified: pypy/dist/lib-python/conftest.py
==============================================================================
--- pypy/dist/lib-python/conftest.py	(original)
+++ pypy/dist/lib-python/conftest.py	Wed Aug  3 15:50:12 2005
@@ -355,10 +355,7 @@
     RegrTest('test_al.py', enabled=False, dumbtest=1),
     RegrTest('test_anydbm.py', enabled=True, core=True),
     RegrTest('test_applesingle.py', enabled=False),
-    RegrTest('test_array.py', enabled=False),
-       # c-extension 
-       #rev 10840: Uncaught interp-level exception: Same place as test_cfgparser
-
+    RegrTest('test_array.py', enabled=True),
     RegrTest('test_asynchat.py', enabled=False),
     RegrTest('test_atexit.py', enabled=False, dumbtest=1, core=True),
     RegrTest('test_audioop.py', enabled=False, dumbtest=1),
@@ -850,7 +847,9 @@
         if regrtest.oldstyle: 
             pypy_options.append('--oldstyle') 
         if regrtest.uselibfile: 
-            pypy_options.append('--file') 
+            pypy_options.append('--file')
+        pypy.options.extend(
+            ['--usemodules=%s' % mod for mod in pypy_option.usemodules])
         sopt = " ".join(pypy_options) 
 
         if regrtest.getoutputpath(): 

Modified: pypy/dist/pypy/conftest.py
==============================================================================
--- pypy/dist/pypy/conftest.py	(original)
+++ pypy/dist/pypy/conftest.py	Wed Aug  3 15:50:12 2005
@@ -16,6 +16,9 @@
 #    group = "pypy options" 
 #    optionlist = 
 
+def usemodules_callback(option, opt, value, parser):
+    parser.values.usemodules.append(value)
+
 option = py.test.Config.addoptions("pypy options", 
         Option('-O', '--objspace', action="store", default=None, 
                type="string", dest="objspace", 
@@ -30,6 +33,9 @@
                help="avoid faking of modules and objects completely."),
         Option('--allpypy', action="store_true",dest="allpypy", default=False, 
                help="run everything possible on top of PyPy."),
+        Option('--usemodules', action="callback", type="string", metavar="NAME",
+               callback=usemodules_callback, default=[],
+               help="(mixed) modules to use."),
     )
 
 def getobjspace(name=None, _spacecache={}): 
@@ -45,6 +51,7 @@
             space = Space(uselibfile=option.uselibfile, 
                           nofaking=option.nofaking, 
                           oldstyle=option.oldstyle,
+                          usemodules=option.usemodules
                           )
         except KeyboardInterrupt: 
             raise 



More information about the Pypy-commit mailing list