Currently, for all tests of py.test, 1277 passed, 183 failed under python3.1. There are mainly 3 kinds of failures:
1. magic/exprinfo.py relies on the compiler package which is no longer supported by python3.x. exprinfo.py is used to construct assertion exception information, and in python3.1 I just simply disable exprinfo.py feature. So, some tests failed because of assertion exception's message does not match the expected string.
2. code/source.py provides a substitute API for compile function, but this API seems does not work well under python3.1. I think the reason is that the compile function's mechanism seems changed. For example:

def foo():
co = compile("x=3", '', 'exec')
exec(co)
print("x:", x)

foo()
The output is: NameError: global name 'x' is not defined. However, this program can be run successfully under python2.x.
3. execnet/ folder aims to support distributed testing feature, and uses io stream tunnel heavily. But, in python3.1, some io streams require bytes not strings. the differences between byte and string are really annoying. So, some tests of py.test failed due to the messages cannot be transported from the sender to the receiver.

Currently passed folders:
builtin/
cmdline/
io/
log/
misc/
path/
process/
rest/
thread/
tool/
xmlobj/

0 comments

Post a Comment