Robert Collins added the comment:

I have a package with tests in it. If the tests match test*.py, they are 
loaded, and load_tests within each one called. But load_tests on the package 
isn't called.

If I change the pattern supplied by the user to match the package, then the 
tests within adjacent packages that don't have a load_tests hook but have files 
called test*.py will no longer match, but the package will match.

My preference would be for the special case to just be removed, and load_tests 
called if it exists: its existence is enough of an opt-in.

Failing that, having two distinct fn patterns, one for packages and one for 
filenames (note the difference: one operates in the python namespace, one the 
filesystem namespace), would suffice.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16662>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to