[pypy-svn] r16427 - in pypy/dist: lib-python pypy/tool/pytest
hpk at codespeak.net
hpk at codespeak.net
Wed Aug 24 20:25:24 CEST 2005
Author: hpk
Date: Wed Aug 24 20:25:24 2005
New Revision: 16427
Modified:
pypy/dist/lib-python/conftest.py
pypy/dist/pypy/tool/pytest/regrverbose.py
Log:
(hpk,nik)
only run regression tests in verbose mode if
we are not running an output tests (mirrors
cpython regrtest.py behaviour)
disabled test_zipimport.py because it depends
on zlib which is a non-core module.
improved the way tests are handled when
invoking '-E' but there still seems to
be something severly broken. tests
with -E pass while they fail with
a plain run.
Modified: pypy/dist/lib-python/conftest.py
==============================================================================
--- pypy/dist/lib-python/conftest.py (original)
+++ pypy/dist/lib-python/conftest.py Wed Aug 24 20:25:24 2005
@@ -260,6 +260,7 @@
space = self.space
filename = str(self.fspath)
callex(space, set_argv, space, space.wrap(filename))
+ #space.call_function(self.w_method)
callex(space, run_testcase_method, space, self.w_method)
# ________________________________________________________________________
@@ -344,7 +345,13 @@
return prev
''')
try:
- callex(space, run_file, str(fspath), space)
+ modname = fspath.purebasename
+ space.appexec([], '''():
+ from test import %(modname)s
+ m = %(modname)s
+ if hasattr(m, 'test_main'):
+ m.test_main()
+ ''' % locals())
finally:
space.enable_new_style_classes_as_default_metaclass()
if self.uselibfile:
@@ -738,11 +745,12 @@
RegrTest('test_xpickle.py', enabled=False),
RegrTest('test_xrange.py', enabled=True, core=True),
RegrTest('test_zipfile.py', enabled=False, dumbtest=1),
- RegrTest('test_zipimport.py', enabled=True, core=True),
- #rev 10840: ImportError: zlib
+ RegrTest('test_zipimport.py', enabled=True),
+ # considered non-core because it depends on 'import zlib'
+ # which we don't have
RegrTest('test_zlib.py', enabled=False),
- #rev 10840: ImportError: zlib
+ #10840: ImportError: zlib
]
class RegrDirectory(py.test.collect.Directory):
@@ -858,10 +866,14 @@
# previously we only did it if regrtest.outputpath() was True
# the regrverbose script now does the logic that CPython
# uses in its regrtest.py
- wrap = str(regr_script)
+ regrrun = str(regr_script)
+ regrrun_verbosity = regrtest.getoutputpath() and '1' or '0'
+
TIMEOUT = gettimeout()
- cmd = "%s %s %d %s %s %s %s" %(python, alarm_script, TIMEOUT,
- pypy_script, sopt, wrap, fspath.purebasename)
+ cmd = "%s %s %d %s %s %s %s %s" %(
+ python, alarm_script, TIMEOUT,
+ pypy_script, sopt,
+ regrrun, regrrun_verbosity, fspath.purebasename)
return cmd
def run(self):
Modified: pypy/dist/pypy/tool/pytest/regrverbose.py
==============================================================================
--- pypy/dist/pypy/tool/pytest/regrverbose.py (original)
+++ pypy/dist/pypy/tool/pytest/regrverbose.py Wed Aug 24 20:25:24 2005
@@ -1,8 +1,8 @@
# refer to 2.4.1/test/regrtest.py's runtest() for comparison
import sys
from test import test_support
-test_support.verbose = False
-sys.argv[:] = sys.argv[1:]
+test_support.verbose = int(sys.argv[1])
+sys.argv[:] = sys.argv[2:]
modname = sys.argv[0]
impname = 'test.' + modname
More information about the Pypy-commit
mailing list