[issue5533] unittest can't deal with packages
Georg Brandl
report at bugs.python.org
Sun Apr 5 15:31:26 CEST 2009
Georg Brandl <georg at python.org> added the comment:
Your script is flawed in two parts:
* it doesn't filter the return value of listdir(), which leads to each
test being executed twice in the presence of .pyc files
* __import__("foo.bar") does *not* return the foo.bar submodule, but the
foo module.
But that is all not relevant because your run_tests is not even called
if unittest finds command line arguments that give test names. See
unittest.TestProgram.parseArgs.
----------
nosy: +georg.brandl
resolution: -> works for me
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5533>
_______________________________________
More information about the Python-bugs-list
mailing list