[pypy-svn] r11495 - pypy/dist/lib-python-2.3.4/test
hpk at codespeak.net
hpk at codespeak.net
Wed Apr 27 00:36:04 CEST 2005
Author: hpk
Date: Wed Apr 27 00:36:04 2005
New Revision: 11495
Modified:
pypy/dist/lib-python-2.3.4/test/conftest.py
Log:
towards running all tests:
- turned all unknown test modules into simple runnable
test modules (some tests might not be like that, though)
- added a new command line option '--withdisabled' which
will now run all tests (certainly with lots of failures)
we might want to flag the 'language feature tests'
tests somehow, btw.
- refactored things a bit but some OperationErrors
don't get nice app-level tracebacks (for example,
test_aepack.py). Don't know why yet. Armin, can
you have a look at e.g. test_aepack.py and see
why "pypy test_aepack.py" shows a somewhat nice
failure but pytestsupport fails at getting that?
Modified: pypy/dist/lib-python-2.3.4/test/conftest.py
==============================================================================
--- pypy/dist/lib-python-2.3.4/test/conftest.py (original)
+++ pypy/dist/lib-python-2.3.4/test/conftest.py Wed Apr 27 00:36:04 2005
@@ -21,6 +21,14 @@
# type="string", dest="listpassing",
# help="just display the list of expected-to-pass tests.")
+Option = py.test.Config.Option
+option = py.test.Config.addoptions("compliance testing options",
+ Option('-D', '--withdisabled', action="store_true",
+ default=False, dest="withdisabled",
+ help="include all disabled tests in the test run."),
+)
+
+
mydir = py.magic.autopath().dirpath()
pypydir = py.path.local(pypy.__file__).dirpath()
@@ -44,7 +52,8 @@
except OperationError, e:
if e.match(space, space.w_KeyboardInterrupt):
raise KeyboardInterrupt
- raise
+ raise py.test.Item.Failed(
+ excinfo=pytestsupport.AppExceptionInfo(space, e))
w_testlist = None
@@ -97,54 +106,30 @@
def __init__(self, fspath, parent, testdecl):
super(py.test.collect.Module, self).__init__(fspath, parent)
self.testdecl = testdecl
+
+ space = property(lambda x: getmyspace())
def tryiter(self, stopitems=()):
try:
for x in super(OpErrorModule, self).tryiter(stopitems):
yield x
except OperationError, e:
- space = getattr(self, 'space', None)
+ space = self.space
if space and e.match(space, space.w_KeyboardInterrupt):
raise Keyboardinterrupt
+ appexcinfo = pytestsupport.AppExceptionInfo(space, e)
+ if appexcinfo.traceback:
+ raise self.Failed(excinfo=appexcinfo)
raise
class OutputTestModule(OpErrorModule):
def run(self):
- return [self.fspath.purebasename]
+ return ['apprunoutput']
def join(self, name):
- if name == self.fspath.purebasename:
- return OutputTestItem(name, parent=self)
+ if name == 'apprunoutput':
+ return OutputTestItem(name, parent=self, fspath=self.fspath)
-class OutputTestItem(py.test.Item):
- def run(self):
- outputpath = self.fspath.dirpath('output', self.name)
- if not outputpath.check():
- py.test.fail("expected outputfile at %s" %(outputpath,))
- if self.parent.testdecl.modified:
- fspath = pypydir.join('lib', 'test2', self.fspath.basename)
- else:
- fspath = self.fspath # unmodified regrtest
- space = getmyspace()
- try:
- oldsysout = sys.stdout
- sys.stdout = capturesysout = py.std.cStringIO.StringIO()
- try:
- print self.fspath.purebasename
- run_file(str(fspath), space=space)
- finally:
- sys.stdout = oldsysout
- except OperationError, e:
- raise self.Failed(
- excinfo=pytestsupport.AppExceptionInfo(space, e))
- else:
- # we want to compare outputs
- result = capturesysout.getvalue()
- expected = outputpath.read(mode='r')
- if result != expected:
- reportdiff(expected, result)
- py.test.fail("output check failed: %s" % (self.fspath.basename,))
-
-class RunningModule(OpErrorModule):
+class SimpleRunModule(OpErrorModule):
def run(self):
return ['apprun']
@@ -153,24 +138,67 @@
return RunAppFileItem(name, parent=self, fspath=self.fspath)
class RunAppFileItem(py.test.Item):
+ """ simple run a module file at app level, fail the test
+ if running the appfile results in an OperationError.
+ """
def __init__(self, name, parent, fspath):
super(RunAppFileItem, self).__init__(name, parent)
self.fspath = fspath
+ self.space = getmyspace()
+
+ def getfspath(self):
+ if self.parent.testdecl.modified:
+ return pypydir.join('lib', 'test2', self.fspath.basename)
+ else:
+ return self.fspath # unmodified regrtest
def run(self):
- fspath = self.fspath
- space = getmyspace()
- run_file(str(fspath), space)
+ fspath = self.getfspath()
+ try:
+ run_file(str(fspath), self.space)
+ except OperationError, e:
+ space = self.space
+ if space and e.match(space, space.w_KeyboardInterrupt):
+ raise Keyboardinterrupt
+ appexcinfo = pytestsupport.AppExceptionInfo(space, e)
+ if appexcinfo.traceback:
+ raise self.Failed(excinfo=appexcinfo)
+ raise
-class UnknownTestModule(OpErrorModule):
+class OutputTestItem(RunAppFileItem):
+ """ Run a module file and compare its output
+ to the expected output in the output/ directory.
+ """
def run(self):
- py.test.skip("missing test type for: %s" %(self.fspath.basename))
-
-class UTModuleMainTest(OpErrorModule):
+ outputpath = self.fspath.dirpath('output', self.name)
+ if not outputpath.check():
+ py.test.fail("expected outputfile at %s" %(outputpath,))
+
+ oldsysout = sys.stdout
+ sys.stdout = capturesysout = py.std.cStringIO.StringIO()
+ try:
+ super(OutputTestItem, self).run()
+ finally:
+ sys.stdout = oldsysout
+ # we want to compare outputs
+ result = capturesysout.getvalue()
+ expected = outputpath.read(mode='r')
+ if result != expected:
+ reportdiff(expected, result)
+ py.test.fail("output check failed: %s" % (self.fspath.basename,))
+ else:
+ print result
+
+#
+class UTTestMainModule(OpErrorModule):
+ """ special handling for tests with a proper 'def test_main(): '
+ definition invoking test_support.run_unittest (XXX and
+ test_support.run_doctest).
+ """
def _prepare(self):
if hasattr(self, '_testcases'):
return
- self.space = space = getmyspace()
+ space = self.space
def f():
w_mod = make_module(space, 'unittest', mydir.join('pypy_unittest.py'))
self.w_TestCase = space.getattr(w_mod, space.wrap('TestCase'))
@@ -273,327 +301,336 @@
def execute(self):
self.space.call_function(self.w_method)
+# ________________________________________________________________________
+#
+# classification of all tests files (this is ongoing work)
+#
+
class TestDecl:
- """ Test Declaration. """
+ """ Test Declaration."""
def __init__(self, enabled, testclass, modified=False):
+ """ if modified is True, the actual test item
+ needs to be taken from the pypy/lib/test2
+ hierarchy.
+ """
self.enabled = enabled
self.testclass = testclass
self.modified = modified
testmap = {
'test_MimeWriter.py' : TestDecl(False, OutputTestModule),
- 'test_StringIO.py' : TestDecl(True, UTModuleMainTest),
- 'test___all__.py' : TestDecl(False, UTModuleMainTest),
- 'test___future__.py' : TestDecl(False, UnknownTestModule),
- 'test_aepack.py' : TestDecl(False, UTModuleMainTest),
- 'test_al.py' : TestDecl(False, UnknownTestModule),
- 'test_anydbm.py' : TestDecl(False, UTModuleMainTest),
- 'test_array.py' : TestDecl(False, UTModuleMainTest),
+ 'test_StringIO.py' : TestDecl(True, UTTestMainModule),
+ 'test___all__.py' : TestDecl(False, UTTestMainModule),
+ 'test___future__.py' : TestDecl(False, SimpleRunModule),
+ 'test_aepack.py' : TestDecl(False, UTTestMainModule),
+ 'test_al.py' : TestDecl(False, SimpleRunModule),
+ 'test_anydbm.py' : TestDecl(False, UTTestMainModule),
+ 'test_array.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception: Same place as test_cfgparser
'test_asynchat.py' : TestDecl(False, OutputTestModule),
- 'test_atexit.py' : TestDecl(False, UnknownTestModule),
- 'test_audioop.py' : TestDecl(False, UnknownTestModule),
+ 'test_atexit.py' : TestDecl(False, SimpleRunModule),
+ 'test_audioop.py' : TestDecl(False, SimpleRunModule),
'test_augassign.py' : TestDecl(False, OutputTestModule),
- 'test_base64.py' : TestDecl(True, UTModuleMainTest),
- 'test_bastion.py' : TestDecl(False, UnknownTestModule),
- 'test_binascii.py' : TestDecl(False, UTModuleMainTest),
+ 'test_base64.py' : TestDecl(True, UTTestMainModule),
+ 'test_bastion.py' : TestDecl(False, SimpleRunModule),
+ 'test_binascii.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 2 of 8 tests fail
- 'test_binhex.py' : TestDecl(False, UTModuleMainTest),
+ 'test_binhex.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 1 of 1 test fails
- 'test_binop.py' : TestDecl(True, UTModuleMainTest),
- 'test_bisect.py' : TestDecl(True, UTModuleMainTest),
- 'test_bool.py' : TestDecl(False, UTModuleMainTest),
+ 'test_binop.py' : TestDecl(True, UTTestMainModule),
+ 'test_bisect.py' : TestDecl(True, UTTestMainModule),
+ 'test_bool.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Infinite recursion in DescrOperation.is_true
- 'test_bsddb.py' : TestDecl(False, UTModuleMainTest),
- 'test_bsddb185.py' : TestDecl(False, UTModuleMainTest),
- 'test_bsddb3.py' : TestDecl(False, UTModuleMainTest),
- 'test_bufio.py' : TestDecl(False, UnknownTestModule),
- 'test_builtin.py' : TestDecl(True, UTModuleMainTest),
- 'test_bz2.py' : TestDecl(False, UTModuleMainTest),
- 'test_calendar.py' : TestDecl(True, UTModuleMainTest),
- 'test_call.py' : TestDecl(True, UTModuleMainTest),
- 'test_capi.py' : TestDecl(False, UnknownTestModule),
- 'test_cd.py' : TestDecl(False, UnknownTestModule),
- 'test_cfgparser.py' : TestDecl(False, UTModuleMainTest),
+ 'test_bsddb.py' : TestDecl(False, UTTestMainModule),
+ 'test_bsddb185.py' : TestDecl(False, UTTestMainModule),
+ 'test_bsddb3.py' : TestDecl(False, UTTestMainModule),
+ 'test_bufio.py' : TestDecl(False, SimpleRunModule),
+ 'test_builtin.py' : TestDecl(True, UTTestMainModule),
+ 'test_bz2.py' : TestDecl(False, UTTestMainModule),
+ 'test_calendar.py' : TestDecl(True, UTTestMainModule),
+ 'test_call.py' : TestDecl(True, UTTestMainModule),
+ 'test_capi.py' : TestDecl(False, SimpleRunModule),
+ 'test_cd.py' : TestDecl(False, SimpleRunModule),
+ 'test_cfgparser.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception:
#File "pypy/objspace/std/fake.py", line 133, in setfastscope
#raise UnwrapError('calling %s: %s' % (self.code.cpy_callable, e))
#pypy.objspace.std.model.UnwrapError: calling <built-in function backslashreplace_errors>: cannot unwrap <UserW_ObjectObject() instance of <W_TypeObject(UnicodeError)>>
'test_cgi.py' : TestDecl(False, OutputTestModule),
- 'test_charmapcodec.py' : TestDecl(True, UTModuleMainTest),
- 'test_cl.py' : TestDecl(False, UnknownTestModule),
+ 'test_charmapcodec.py' : TestDecl(True, UTTestMainModule),
+ 'test_cl.py' : TestDecl(False, SimpleRunModule),
'test_class.py' : TestDecl(False, OutputTestModule),
- 'test_cmath.py' : TestDecl(True, RunningModule),
- 'test_codeccallbacks.py' : TestDecl(False, UTModuleMainTest),
+ 'test_cmath.py' : TestDecl(True, SimpleRunModule),
+ 'test_codeccallbacks.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception: Same place as test_cfgparser
- 'test_codecs.py' : TestDecl(False, UTModuleMainTest),
+ 'test_codecs.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception: Same place as test_cfgparser
- 'test_codeop.py' : TestDecl(True, UTModuleMainTest),
+ 'test_codeop.py' : TestDecl(True, UTTestMainModule),
'test_coercion.py' : TestDecl(False, OutputTestModule),
- 'test_commands.py' : TestDecl(True, UTModuleMainTest),
+ 'test_commands.py' : TestDecl(True, UTTestMainModule),
'test_compare.py' : TestDecl(True, OutputTestModule),
- 'test_compile.py' : TestDecl(True, UTModuleMainTest),
- 'test_complex.py' : TestDecl(False, UTModuleMainTest),
+ 'test_compile.py' : TestDecl(True, UTTestMainModule),
+ 'test_complex.py' : TestDecl(False, UTTestMainModule),
#rev 10840: at least one test fails, after several hours I gave up waiting for the rest
- 'test_contains.py' : TestDecl(False, UnknownTestModule),
+ 'test_contains.py' : TestDecl(False, SimpleRunModule),
'test_cookie.py' : TestDecl(False, OutputTestModule),
- 'test_copy.py' : TestDecl(True, UTModuleMainTest),
- 'test_copy_reg.py' : TestDecl(True, UTModuleMainTest),
- 'test_cpickle.py' : TestDecl(False, UTModuleMainTest),
- 'test_crypt.py' : TestDecl(False, UnknownTestModule),
- 'test_csv.py' : TestDecl(False, UTModuleMainTest),
+ 'test_copy.py' : TestDecl(True, UTTestMainModule),
+ 'test_copy_reg.py' : TestDecl(True, UTTestMainModule),
+ 'test_cpickle.py' : TestDecl(False, UTTestMainModule),
+ 'test_crypt.py' : TestDecl(False, SimpleRunModule),
+ 'test_csv.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: _csv
- 'test_curses.py' : TestDecl(False, UnknownTestModule),
- 'test_datetime.py' : TestDecl(True, UTModuleMainTest),
- 'test_dbm.py' : TestDecl(False, UnknownTestModule),
- 'test_descr.py' : TestDecl(False, UTModuleMainTest),
- 'test_descrtut.py' : TestDecl(False, UTModuleMainTest),
+ 'test_curses.py' : TestDecl(False, SimpleRunModule),
+ 'test_datetime.py' : TestDecl(True, UTTestMainModule),
+ 'test_dbm.py' : TestDecl(False, SimpleRunModule),
+ 'test_descr.py' : TestDecl(False, UTTestMainModule),
+ 'test_descrtut.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 19 of 96 tests fail
- 'test_difflib.py' : TestDecl(False, UnknownTestModule),
- 'test_dircache.py' : TestDecl(True, UTModuleMainTest),
- 'test_dis.py' : TestDecl(True, UTModuleMainTest),
- 'test_dl.py' : TestDecl(False, UnknownTestModule),
- 'test_doctest.py' : TestDecl(False, UnknownTestModule),
- 'test_doctest2.py' : TestDecl(True, UTModuleMainTest),
- 'test_dumbdbm.py' : TestDecl(False, UTModuleMainTest),
+ 'test_difflib.py' : TestDecl(False, SimpleRunModule),
+ 'test_dircache.py' : TestDecl(True, UTTestMainModule),
+ 'test_dis.py' : TestDecl(True, UTTestMainModule),
+ 'test_dl.py' : TestDecl(False, SimpleRunModule),
+ 'test_doctest.py' : TestDecl(False, SimpleRunModule),
+ 'test_doctest2.py' : TestDecl(True, UTTestMainModule),
+ 'test_dumbdbm.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 5 of 7 tests fail
- 'test_dummy_thread.py' : TestDecl(True, UTModuleMainTest),
- 'test_dummy_threading.py': TestDecl(False, UnknownTestModule),
- 'test_email.py' : TestDecl(False, UTModuleMainTest),
+ 'test_dummy_thread.py' : TestDecl(True, UTTestMainModule),
+ 'test_dummy_threading.py': TestDecl(False, SimpleRunModule),
+ 'test_email.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception
- 'test_email_codecs.py' : TestDecl(False, UnknownTestModule),
- 'test_enumerate.py' : TestDecl(False, UTModuleMainTest),
+ 'test_email_codecs.py' : TestDecl(False, SimpleRunModule),
+ 'test_enumerate.py' : TestDecl(False, UTTestMainModule),
#rev 10840: fails because enumerate is a type in CPy: the test tries to subclass it
- 'test_eof.py' : TestDecl(False, UTModuleMainTest),
+ 'test_eof.py' : TestDecl(False, UTTestMainModule),
#rev 10840: some error strings differ slightly XXX
- 'test_errno.py' : TestDecl(False, UnknownTestModule),
+ 'test_errno.py' : TestDecl(False, SimpleRunModule),
'test_exceptions.py' : TestDecl(False, OutputTestModule),
'test_extcall.py' : TestDecl(False, OutputTestModule),
- 'test_fcntl.py' : TestDecl(False, UnknownTestModule),
- 'test_file.py' : TestDecl(False, UnknownTestModule),
- 'test_filecmp.py' : TestDecl(False, UTModuleMainTest),
- 'test_fileinput.py' : TestDecl(False, UnknownTestModule),
- 'test_fnmatch.py' : TestDecl(True, UTModuleMainTest),
- 'test_fork1.py' : TestDecl(False, UnknownTestModule),
- 'test_format.py' : TestDecl(False, UnknownTestModule),
- 'test_fpformat.py' : TestDecl(True, UTModuleMainTest),
+ 'test_fcntl.py' : TestDecl(False, SimpleRunModule),
+ 'test_file.py' : TestDecl(False, SimpleRunModule),
+ 'test_filecmp.py' : TestDecl(False, UTTestMainModule),
+ 'test_fileinput.py' : TestDecl(False, SimpleRunModule),
+ 'test_fnmatch.py' : TestDecl(True, UTTestMainModule),
+ 'test_fork1.py' : TestDecl(False, SimpleRunModule),
+ 'test_format.py' : TestDecl(False, SimpleRunModule),
+ 'test_fpformat.py' : TestDecl(True, UTTestMainModule),
'test_frozen.py' : TestDecl(False, OutputTestModule),
- 'test_funcattrs.py' : TestDecl(False, UnknownTestModule),
+ 'test_funcattrs.py' : TestDecl(False, SimpleRunModule),
'test_future.py' : TestDecl(False, OutputTestModule),
- 'test_future1.py' : TestDecl(False, UnknownTestModule),
- 'test_future2.py' : TestDecl(False, UnknownTestModule),
- 'test_future3.py' : TestDecl(True, UTModuleMainTest),
- 'test_gc.py' : TestDecl(False, UnknownTestModule),
- 'test_gdbm.py' : TestDecl(False, UnknownTestModule),
- 'test_generators.py' : TestDecl(False, UTModuleMainTest),
+ 'test_future1.py' : TestDecl(False, SimpleRunModule),
+ 'test_future2.py' : TestDecl(False, SimpleRunModule),
+ 'test_future3.py' : TestDecl(True, UTTestMainModule),
+ 'test_gc.py' : TestDecl(False, SimpleRunModule),
+ 'test_gdbm.py' : TestDecl(False, SimpleRunModule),
+ 'test_generators.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 30 of 152 tests fail
- 'test_getargs.py' : TestDecl(False, UnknownTestModule),
- 'test_getargs2.py' : TestDecl(False, UTModuleMainTest),
+ 'test_getargs.py' : TestDecl(False, SimpleRunModule),
+ 'test_getargs2.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: _testcapi
- 'test_getopt.py' : TestDecl(False, UnknownTestModule),
- 'test_gettext.py' : TestDecl(False, UTModuleMainTest),
+ 'test_getopt.py' : TestDecl(False, SimpleRunModule),
+ 'test_gettext.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 28 of 28 tests fail
- 'test_gl.py' : TestDecl(False, UnknownTestModule),
- 'test_glob.py' : TestDecl(True, UTModuleMainTest),
+ 'test_gl.py' : TestDecl(False, SimpleRunModule),
+ 'test_glob.py' : TestDecl(True, UTTestMainModule),
'test_global.py' : TestDecl(False, OutputTestModule),
'test_grammar.py' : TestDecl(False, OutputTestModule),
- 'test_grp.py' : TestDecl(False, UTModuleMainTest),
+ 'test_grp.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: grp
- 'test_gzip.py' : TestDecl(False, UnknownTestModule),
- 'test_hash.py' : TestDecl(True, UTModuleMainTest),
- 'test_heapq.py' : TestDecl(True, UTModuleMainTest),
- 'test_hexoct.py' : TestDecl(True, UTModuleMainTest),
- 'test_hmac.py' : TestDecl(True, UTModuleMainTest),
- 'test_hotshot.py' : TestDecl(False, UTModuleMainTest),
+ 'test_gzip.py' : TestDecl(False, SimpleRunModule),
+ 'test_hash.py' : TestDecl(True, UTTestMainModule),
+ 'test_heapq.py' : TestDecl(True, UTTestMainModule),
+ 'test_hexoct.py' : TestDecl(True, UTTestMainModule),
+ 'test_hmac.py' : TestDecl(True, UTTestMainModule),
+ 'test_hotshot.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: _hotshot
- 'test_htmllib.py' : TestDecl(True, UTModuleMainTest),
- 'test_htmlparser.py' : TestDecl(True, UTModuleMainTest),
+ 'test_htmllib.py' : TestDecl(True, UTTestMainModule),
+ 'test_htmlparser.py' : TestDecl(True, UTTestMainModule),
'test_httplib.py' : TestDecl(False, OutputTestModule),
- 'test_imageop.py' : TestDecl(False, UnknownTestModule),
- 'test_imaplib.py' : TestDecl(False, UnknownTestModule),
- 'test_imgfile.py' : TestDecl(False, UnknownTestModule),
- 'test_imp.py' : TestDecl(False, UTModuleMainTest),
- 'test_import.py' : TestDecl(False, UnknownTestModule),
- 'test_importhooks.py' : TestDecl(False, UTModuleMainTest),
- 'test_inspect.py' : TestDecl(False, UnknownTestModule),
- 'test_ioctl.py' : TestDecl(False, UTModuleMainTest),
- 'test_isinstance.py' : TestDecl(True, UTModuleMainTest),
- 'test_iter.py' : TestDecl(False, UTModuleMainTest),
+ 'test_imageop.py' : TestDecl(False, SimpleRunModule),
+ 'test_imaplib.py' : TestDecl(False, SimpleRunModule),
+ 'test_imgfile.py' : TestDecl(False, SimpleRunModule),
+ 'test_imp.py' : TestDecl(False, UTTestMainModule),
+ 'test_import.py' : TestDecl(False, SimpleRunModule),
+ 'test_importhooks.py' : TestDecl(False, UTTestMainModule),
+ 'test_inspect.py' : TestDecl(False, SimpleRunModule),
+ 'test_ioctl.py' : TestDecl(False, UTTestMainModule),
+ 'test_isinstance.py' : TestDecl(True, UTTestMainModule),
+ 'test_iter.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception: Same place as test_cfgparser
- 'test_itertools.py' : TestDecl(True, UTModuleMainTest, modified=True),
+ 'test_itertools.py' : TestDecl(True, UTTestMainModule, modified=True),
# modified version in pypy/lib/test2
- 'test_largefile.py' : TestDecl(False, UnknownTestModule),
+ 'test_largefile.py' : TestDecl(False, SimpleRunModule),
'test_linuxaudiodev.py' : TestDecl(False, OutputTestModule),
- 'test_locale.py' : TestDecl(False, UnknownTestModule),
+ 'test_locale.py' : TestDecl(False, SimpleRunModule),
'test_logging.py' : TestDecl(False, OutputTestModule),
- 'test_long.py' : TestDecl(True, UnknownTestModule), # takes hours
- 'test_long_future.py' : TestDecl(False, UnknownTestModule),
+ 'test_long.py' : TestDecl(True, SimpleRunModule), # takes hours
+ 'test_long_future.py' : TestDecl(False, SimpleRunModule),
'test_longexp.py' : TestDecl(False, OutputTestModule),
- 'test_macfs.py' : TestDecl(False, UTModuleMainTest),
- 'test_macostools.py' : TestDecl(False, UTModuleMainTest),
- 'test_macpath.py' : TestDecl(False, UTModuleMainTest),
- 'test_mailbox.py' : TestDecl(True, UTModuleMainTest),
- 'test_marshal.py' : TestDecl(False, UnknownTestModule),
+ 'test_macfs.py' : TestDecl(False, UTTestMainModule),
+ 'test_macostools.py' : TestDecl(False, UTTestMainModule),
+ 'test_macpath.py' : TestDecl(False, UTTestMainModule),
+ 'test_mailbox.py' : TestDecl(True, UTTestMainModule),
+ 'test_marshal.py' : TestDecl(False, SimpleRunModule),
'test_math.py' : TestDecl(False, OutputTestModule),
'test_md5.py' : TestDecl(False, OutputTestModule),
- 'test_mhlib.py' : TestDecl(True, UTModuleMainTest),
- 'test_mimetools.py' : TestDecl(True, UTModuleMainTest),
- 'test_mimetypes.py' : TestDecl(True, UTModuleMainTest),
- 'test_minidom.py' : TestDecl(False, UnknownTestModule),
+ 'test_mhlib.py' : TestDecl(True, UTTestMainModule),
+ 'test_mimetools.py' : TestDecl(True, UTTestMainModule),
+ 'test_mimetypes.py' : TestDecl(True, UTTestMainModule),
+ 'test_minidom.py' : TestDecl(False, SimpleRunModule),
'test_mmap.py' : TestDecl(False, OutputTestModule),
- 'test_module.py' : TestDecl(False, UnknownTestModule),
- 'test_mpz.py' : TestDecl(False, UnknownTestModule),
- 'test_multifile.py' : TestDecl(True, UTModuleMainTest),
- 'test_mutants.py' : TestDecl(False, UnknownTestModule),
- 'test_netrc.py' : TestDecl(True, UTModuleMainTest),
+ 'test_module.py' : TestDecl(False, SimpleRunModule),
+ 'test_mpz.py' : TestDecl(False, SimpleRunModule),
+ 'test_multifile.py' : TestDecl(True, UTTestMainModule),
+ 'test_mutants.py' : TestDecl(False, SimpleRunModule),
+ 'test_netrc.py' : TestDecl(True, UTTestMainModule),
'test_new.py' : TestDecl(False, OutputTestModule),
'test_nis.py' : TestDecl(False, OutputTestModule),
- 'test_normalization.py' : TestDecl(False, UTModuleMainTest),
- 'test_ntpath.py' : TestDecl(False, UnknownTestModule),
+ 'test_normalization.py' : TestDecl(False, UTTestMainModule),
+ 'test_ntpath.py' : TestDecl(False, SimpleRunModule),
'test_opcodes.py' : TestDecl(False, OutputTestModule),
'test_openpty.py' : TestDecl(False, OutputTestModule),
'test_operations.py' : TestDecl(False, OutputTestModule),
- 'test_operator.py' : TestDecl(True, UTModuleMainTest),
- 'test_optparse.py' : TestDecl(False, UTModuleMainTest),
- 'test_os.py' : TestDecl(True, UTModuleMainTest),
+ 'test_operator.py' : TestDecl(True, UTTestMainModule),
+ 'test_optparse.py' : TestDecl(False, UTTestMainModule),
+ 'test_os.py' : TestDecl(True, UTTestMainModule),
'test_ossaudiodev.py' : TestDecl(False, OutputTestModule),
- 'test_parser.py' : TestDecl(True, UTModuleMainTest),
+ 'test_parser.py' : TestDecl(True, UTTestMainModule),
#rev 10840: 18 of 18 tests fail
- 'test_pep247.py' : TestDecl(False, UnknownTestModule),
- 'test_pep263.py' : TestDecl(False, UnknownTestModule),
- 'test_pep277.py' : TestDecl(False, UTModuleMainTest),
- 'test_pickle.py' : TestDecl(False, UTModuleMainTest),
- 'test_pickletools.py' : TestDecl(False, UnknownTestModule),
+ 'test_pep247.py' : TestDecl(False, SimpleRunModule),
+ 'test_pep263.py' : TestDecl(False, SimpleRunModule),
+ 'test_pep277.py' : TestDecl(False, UTTestMainModule),
+ 'test_pickle.py' : TestDecl(False, UTTestMainModule),
+ 'test_pickletools.py' : TestDecl(False, SimpleRunModule),
'test_pkg.py' : TestDecl(False, OutputTestModule),
- 'test_pkgimport.py' : TestDecl(True, UTModuleMainTest),
- 'test_plistlib.py' : TestDecl(False, UTModuleMainTest),
+ 'test_pkgimport.py' : TestDecl(True, UTTestMainModule),
+ 'test_plistlib.py' : TestDecl(False, UTTestMainModule),
'test_poll.py' : TestDecl(False, OutputTestModule),
'test_popen.py' : TestDecl(False, OutputTestModule),
'test_popen2.py' : TestDecl(False, OutputTestModule),
- 'test_posix.py' : TestDecl(True, UTModuleMainTest),
- 'test_posixpath.py' : TestDecl(True, UTModuleMainTest),
- 'test_pow.py' : TestDecl(True, UTModuleMainTest),
- 'test_pprint.py' : TestDecl(True, UTModuleMainTest),
+ 'test_posix.py' : TestDecl(True, UTTestMainModule),
+ 'test_posixpath.py' : TestDecl(True, UTTestMainModule),
+ 'test_pow.py' : TestDecl(True, UTTestMainModule),
+ 'test_pprint.py' : TestDecl(True, UTTestMainModule),
'test_profile.py' : TestDecl(True, OutputTestModule),
- 'test_profilehooks.py' : TestDecl(True, UTModuleMainTest),
+ 'test_profilehooks.py' : TestDecl(True, UTTestMainModule),
'test_pty.py' : TestDecl(False, OutputTestModule),
- 'test_pwd.py' : TestDecl(False, UTModuleMainTest),
+ 'test_pwd.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: pwd
- 'test_pyclbr.py' : TestDecl(False, UTModuleMainTest),
+ 'test_pyclbr.py' : TestDecl(False, UTTestMainModule),
'test_pyexpat.py' : TestDecl(False, OutputTestModule),
- 'test_queue.py' : TestDecl(False, UnknownTestModule),
- 'test_quopri.py' : TestDecl(False, UTModuleMainTest),
- 'test_random.py' : TestDecl(False, UTModuleMainTest),
+ 'test_queue.py' : TestDecl(False, SimpleRunModule),
+ 'test_quopri.py' : TestDecl(False, UTTestMainModule),
+ 'test_random.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught app-level exception:
#class WichmannHill_TestBasicOps(TestBasicOps):
#File "test_random.py", line 125 in WichmannHill_TestBasicOps
#gen = random.WichmannHill()
#AttributeError: 'module' object has no attribute 'WichmannHill'
- 'test_re.py' : TestDecl(False, UTModuleMainTest),
+ 'test_re.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 7 of 47 tests fail
'test_regex.py' : TestDecl(False, OutputTestModule),
- 'test_repr.py' : TestDecl(False, UTModuleMainTest),
+ 'test_repr.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 6 of 12 tests fail. Always minor stuff like
#'<function object at 0x40db3e0c>' != '<built-in function hash>'
'test_resource.py' : TestDecl(False, OutputTestModule),
- 'test_rfc822.py' : TestDecl(True, UTModuleMainTest),
+ 'test_rfc822.py' : TestDecl(True, UTTestMainModule),
'test_rgbimg.py' : TestDecl(False, OutputTestModule),
- 'test_richcmp.py' : TestDecl(False, UTModuleMainTest),
+ 'test_richcmp.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 1 of 11 test fails. The failing one had an infinite recursion.
- 'test_robotparser.py' : TestDecl(True, UTModuleMainTest),
+ 'test_robotparser.py' : TestDecl(True, UTTestMainModule),
'test_rotor.py' : TestDecl(False, OutputTestModule),
- 'test_sax.py' : TestDecl(False, UnknownTestModule),
+ 'test_sax.py' : TestDecl(False, SimpleRunModule),
'test_scope.py' : TestDecl(False, OutputTestModule),
- 'test_scriptpackages.py' : TestDecl(False, UTModuleMainTest),
- 'test_select.py' : TestDecl(False, UnknownTestModule),
- 'test_sets.py' : TestDecl(True, UTModuleMainTest),
- 'test_sgmllib.py' : TestDecl(True, UTModuleMainTest),
- 'test_sha.py' : TestDecl(True, UTModuleMainTest, modified=True),
+ 'test_scriptpackages.py' : TestDecl(False, UTTestMainModule),
+ 'test_select.py' : TestDecl(False, SimpleRunModule),
+ 'test_sets.py' : TestDecl(True, UTTestMainModule),
+ 'test_sgmllib.py' : TestDecl(True, UTTestMainModule),
+ 'test_sha.py' : TestDecl(True, UTTestMainModule, modified=True),
# one test is taken out (too_slow_test_case_3), rest passses
- 'test_shelve.py' : TestDecl(True, UTModuleMainTest),
- 'test_shlex.py' : TestDecl(True, UTModuleMainTest),
- 'test_shutil.py' : TestDecl(True, UTModuleMainTest),
+ 'test_shelve.py' : TestDecl(True, UTTestMainModule),
+ 'test_shlex.py' : TestDecl(True, UTTestMainModule),
+ 'test_shutil.py' : TestDecl(True, UTTestMainModule),
'test_signal.py' : TestDecl(False, OutputTestModule),
- 'test_slice.py' : TestDecl(False, UnknownTestModule),
- 'test_socket.py' : TestDecl(False, UTModuleMainTest),
+ 'test_slice.py' : TestDecl(False, SimpleRunModule),
+ 'test_socket.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: thread
- 'test_socket_ssl.py' : TestDecl(False, UTModuleMainTest),
- 'test_socketserver.py' : TestDecl(False, UTModuleMainTest),
+ 'test_socket_ssl.py' : TestDecl(False, UTTestMainModule),
+ 'test_socketserver.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: thread
- 'test_softspace.py' : TestDecl(False, UnknownTestModule),
- 'test_sort.py' : TestDecl(False, UnknownTestModule),
- 'test_str.py' : TestDecl(False, UTModuleMainTest),
+ 'test_softspace.py' : TestDecl(False, SimpleRunModule),
+ 'test_sort.py' : TestDecl(False, SimpleRunModule),
+ 'test_str.py' : TestDecl(False, UTTestMainModule),
#rev 10840: at least two tests fail, after several hours I gave up waiting for the rest
- 'test_strftime.py' : TestDecl(False, UnknownTestModule),
- 'test_string.py' : TestDecl(True, UTModuleMainTest),
- 'test_stringprep.py' : TestDecl(False, UnknownTestModule),
- 'test_strop.py' : TestDecl(False, UTModuleMainTest),
+ 'test_strftime.py' : TestDecl(False, SimpleRunModule),
+ 'test_string.py' : TestDecl(True, UTTestMainModule),
+ 'test_stringprep.py' : TestDecl(False, SimpleRunModule),
+ 'test_strop.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: strop
- 'test_strptime.py' : TestDecl(False, UTModuleMainTest),
+ 'test_strptime.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 1 of 42 test fails: seems to be some regex problem
- 'test_struct.py' : TestDecl(False, UnknownTestModule),
- 'test_structseq.py' : TestDecl(False, UnknownTestModule),
- 'test_sunaudiodev.py' : TestDecl(False, UnknownTestModule),
- 'test_sundry.py' : TestDecl(False, UnknownTestModule),
- 'test_support.py' : TestDecl(False, UnknownTestModule),
- 'test_symtable.py' : TestDecl(False, UnknownTestModule),
- 'test_syntax.py' : TestDecl(True, UTModuleMainTest),
- 'test_sys.py' : TestDecl(True, UTModuleMainTest),
- 'test_tarfile.py' : TestDecl(False, UTModuleMainTest),
+ 'test_struct.py' : TestDecl(False, SimpleRunModule),
+ 'test_structseq.py' : TestDecl(False, SimpleRunModule),
+ 'test_sunaudiodev.py' : TestDecl(False, SimpleRunModule),
+ 'test_sundry.py' : TestDecl(False, SimpleRunModule),
+ 'test_support.py' : TestDecl(False, SimpleRunModule),
+ 'test_symtable.py' : TestDecl(False, SimpleRunModule),
+ 'test_syntax.py' : TestDecl(True, UTTestMainModule),
+ 'test_sys.py' : TestDecl(True, UTTestMainModule),
+ 'test_tarfile.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 13 of 13 test fail
- 'test_tempfile.py' : TestDecl(False, UTModuleMainTest),
+ 'test_tempfile.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception: Same place as test_cfgparser
- 'test_textwrap.py' : TestDecl(True, UTModuleMainTest),
+ 'test_textwrap.py' : TestDecl(True, UTTestMainModule),
'test_thread.py' : TestDecl(False, OutputTestModule),
- 'test_threaded_import.py': TestDecl(False, UTModuleMainTest),
+ 'test_threaded_import.py': TestDecl(False, UTTestMainModule),
'test_threadedtempfile.py': TestDecl(False, OutputTestModule),
#rev 10840: ImportError: thread
- 'test_threading.py' : TestDecl(False, UnknownTestModule),
+ 'test_threading.py' : TestDecl(False, SimpleRunModule),
#rev 10840: ImportError: thread
- 'test_time.py' : TestDecl(True, UTModuleMainTest),
- 'test_timeout.py' : TestDecl(False, UTModuleMainTest),
+ 'test_time.py' : TestDecl(True, UTTestMainModule),
+ 'test_timeout.py' : TestDecl(False, UTTestMainModule),
#rev 10840: Uncaught interp-level exception: Same place as test_cfgparser
- 'test_timing.py' : TestDecl(False, UnknownTestModule),
+ 'test_timing.py' : TestDecl(False, SimpleRunModule),
'test_tokenize.py' : TestDecl(False, OutputTestModule),
- 'test_trace.py' : TestDecl(True, UTModuleMainTest),
- 'test_traceback.py' : TestDecl(False, UTModuleMainTest),
+ 'test_trace.py' : TestDecl(True, UTTestMainModule),
+ 'test_traceback.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 2 of 2 tests fail
'test_types.py' : TestDecl(False, OutputTestModule, modified=True),
@@ -602,59 +639,65 @@
# > (application-level) TypeError: an integer is required
# [/home/hpk/pypy-dist/pypy/lib/test2/test_types.py:217]
- 'test_ucn.py' : TestDecl(False, UTModuleMainTest),
- 'test_unary.py' : TestDecl(True, UTModuleMainTest),
- 'test_unicode.py' : TestDecl(False, UTModuleMainTest),
+ 'test_ucn.py' : TestDecl(False, UTTestMainModule),
+ 'test_unary.py' : TestDecl(True, UTTestMainModule),
+ 'test_unicode.py' : TestDecl(False, UTTestMainModule),
'test_unicode_file.py' : TestDecl(False, OutputTestModule),
- 'test_unicodedata.py' : TestDecl(False, UTModuleMainTest),
- 'test_univnewlines.py' : TestDecl(True, UTModuleMainTest),
- 'test_unpack.py' : TestDecl(False, UnknownTestModule),
- 'test_urllib.py' : TestDecl(True, UTModuleMainTest),
+ 'test_unicodedata.py' : TestDecl(False, UTTestMainModule),
+ 'test_univnewlines.py' : TestDecl(True, UTTestMainModule),
+ 'test_unpack.py' : TestDecl(False, SimpleRunModule),
+ 'test_urllib.py' : TestDecl(True, UTTestMainModule),
#rev 10840: 10 of 10 tests fail
- 'test_urllib2.py' : TestDecl(False, UnknownTestModule),
- 'test_urllibnet.py' : TestDecl(False, UTModuleMainTest),
- 'test_urlparse.py' : TestDecl(True, UTModuleMainTest),
- 'test_userdict.py' : TestDecl(True, UTModuleMainTest),
+ 'test_urllib2.py' : TestDecl(False, SimpleRunModule),
+ 'test_urllibnet.py' : TestDecl(False, UTTestMainModule),
+ 'test_urlparse.py' : TestDecl(True, UTTestMainModule),
+ 'test_userdict.py' : TestDecl(True, UTTestMainModule),
#rev 10840: 5 of 25 tests fail
- 'test_userlist.py' : TestDecl(False, UTModuleMainTest),
+ 'test_userlist.py' : TestDecl(False, UTTestMainModule),
#rev 10840: at least two tests fail, after several hours I gave up waiting for the rest
- 'test_userstring.py' : TestDecl(False, UTModuleMainTest),
- 'test_uu.py' : TestDecl(False, UTModuleMainTest),
+ 'test_userstring.py' : TestDecl(False, UTTestMainModule),
+ 'test_uu.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 1 of 9 test fails
- 'test_warnings.py' : TestDecl(True, UTModuleMainTest),
- 'test_wave.py' : TestDecl(False, UnknownTestModule),
- 'test_weakref.py' : TestDecl(False, UTModuleMainTest),
+ 'test_warnings.py' : TestDecl(True, UTTestMainModule),
+ 'test_wave.py' : TestDecl(False, SimpleRunModule),
+ 'test_weakref.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: _weakref
- 'test_whichdb.py' : TestDecl(False, UTModuleMainTest),
+ 'test_whichdb.py' : TestDecl(False, UTTestMainModule),
'test_winreg.py' : TestDecl(False, OutputTestModule),
- 'test_winsound.py' : TestDecl(False, UTModuleMainTest),
- 'test_xmllib.py' : TestDecl(False, UTModuleMainTest),
- 'test_xmlrpc.py' : TestDecl(False, UTModuleMainTest),
+ 'test_winsound.py' : TestDecl(False, UTTestMainModule),
+ 'test_xmllib.py' : TestDecl(False, UTTestMainModule),
+ 'test_xmlrpc.py' : TestDecl(False, UTTestMainModule),
#rev 10840: 2 of 5 tests fail
- 'test_xpickle.py' : TestDecl(False, UTModuleMainTest),
+ 'test_xpickle.py' : TestDecl(False, UTTestMainModule),
'test_xreadline.py' : TestDecl(False, OutputTestModule),
- 'test_zipfile.py' : TestDecl(False, UnknownTestModule),
- 'test_zipimport.py' : TestDecl(False, UTModuleMainTest),
+ 'test_zipfile.py' : TestDecl(False, SimpleRunModule),
+ 'test_zipimport.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: zlib
- 'test_zlib.py' : TestDecl(False, UTModuleMainTest),
+ 'test_zlib.py' : TestDecl(False, UTTestMainModule),
#rev 10840: ImportError: zlib
}
class RegrDirectory(py.test.collect.Directory):
+ """ A special collector for the compliance tests
+ of CPython. Basically we work off the above 'testmap'
+ which describes for all test modules their specific
+ type. XXX If you find errors in the classification
+ please correct them!
+ """
testmap = testmap
def run(self):
l = []
items = self.testmap.items()
items.sort(lambda x,y: cmp(x[0].lower(), y[0].lower()))
for name, testdecl in items:
- if testdecl.enabled:
+ if option.withdisabled or testdecl.enabled:
l.append(name)
return l
@@ -663,8 +706,6 @@
testdecl = self.testmap[name]
fspath = self.fspath.join(name)
return testdecl.testclass(fspath, parent=self, testdecl=testdecl)
- else:
- raise ValueError("no test type specified for %s" %(name,))
Directory = RegrDirectory
More information about the Pypy-commit
mailing list