[issue16748] Make CPython test package discoverable

Terry J. Reedy report at bugs.python.org
Wed May 15 20:43:16 CEST 2013


Terry J. Reedy added the comment:

Chris: >>> import unittest as u; u.main("test.test_xxx")
Ezio: I think that's the last nail in the coffin of test_main.
Terry, do you agree?

Belated answer: now that I use and understand the idiom, yes.

Chris: The load_tests protocol (2.7, 3.2+) seems like the right approach for [tests in directories outside of /test].

I am using that in the new idlelib/idle_test/__init__.py. But perhaps the load_tests() example in the doc, which I copied, should be changed from 'do nothing' to 'discover all tests in the directory' as a more useful default.

----------

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


More information about the Python-bugs-list mailing list