[issue23882] unittest discovery and namespaced packages

Alex Shkop report at bugs.python.org
Mon Apr 20 09:12:50 CEST 2015


Alex Shkop added the comment:

This script creates following directory structure

issue_23882\
  tests\
    test_fail.py

If you run from issue_23882 directory

python -m unittest

it doesn't find any tests. If there is __init__.py inside tests folder, same command finds test_fail.py and runs it.

I'm not sure yet about using pkgutil cause looks like iter_modules and walk_packages do not find namespace packages as well.

----------
Added file: http://bugs.python.org/file39142/issue_23882_test_case.sh

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23882>
_______________________________________


More information about the Python-bugs-list mailing list