[pypy-dev] [issue17] Unittest test_interpreter.py gives strange results.
Rocco Moretti
pypy-issues at codespeak.net
Sat Apr 19 02:09:44 CEST 2003
New submission from Rocco Moretti <roccomoretti at netscape.net>:
The tests don't really "fail" - it is just that tracebacks
are printed. This possibly could be corrected by using
stdout/stderr redirection, if the printing of tracebacks is
the desired effect.
Under revision 367 here is the (edited) '-v'(erbose) error
message:
C:\PYTHON22\lib\pypy\interpreter\test\test_interpreter.py
============================================================
<...>
test_except3 (__main__.TestInterpreter) ... Traceback
(application-level):
File '<inline>', line 5 in f
z = 1//v
||Traceback (interpreter-level):
|| File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line
51, in eval
|| opcode.dispatch_noarg(self, op)
|| File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line
698, in dispatch_noarg
|| fn(f)
|| File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line
26, in __call__
|| w_result = operation(w_1, w_2)
|| File "<string>", line 6, in floordiv
(application-level) TypeError: unsupported operand type(s)
for //: 'int' and 'str'
ok
<...>
test_print (__main__.TestInterpreter) ... 10
ok
test_raise (__main__.TestInterpreter) ... Traceback
(application-level):
File '<inline>', line 3 in f
raise 1
File
'C:\\PYTHON22\\lib\\pypy\\interpreter\\opcode_app.py', line
29 in prepare_raise
raise TypeError, "exceptions must be classes,
instances, or " \
||Traceback (interpreter-level):
|| File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line
49, in eval
|| opcode.dispatch_arg(self, op, oparg)
|| File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line
707, in dispatch_arg
|| fn(f, oparg)
|| File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line
268, in RAISE_VARARGS
|| raise OperationError(w_type, w_value)
(application-level) TypeError: exceptions must be classes,
instances, or strings (deprecated), not int
ok
<...>
----------------------------------------------------------------------
Ran 12 tests in 1.810s
OK
----------
messages: 36
nosy: rocco
priority: bug
status: unread
title: Unittest test_interpreter.py gives strange results.
__________________________________________________
PyPython issue tracker <pypy-issues at codespeak.net>
http://codespeak.net/issues/pypy/issue17
__________________________________________________
More information about the Pypy-dev
mailing list