◐ Shell
clean mode source ↗

Message 189292 - Python tracker

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.