Michael Foord <mich...@voidspace.org.uk> added the comment: Updated patch with documentation and fixed command line usage message.
Unless there are objections I intend to check this in in the next few days. It would be helpful if someone else could go over the documentation and check for errors / typos etc. I've already had feedback from a few folks. The only suggestions so far have been: * Instead of a discover method the functionality could be built into TestLoader.loadTestsFromPath. This would be a substantial change and I think it better belongs in a new method. * discover could simply load all modules and discover TestCases instead of needing a pattern to filter on. I think filtering is an important feature (not least for performance and because importing arbitrary modules is not safe). Loading all modules can be had by passing in a pattern of '*' The behavior as implemented is a subset of the test discovery provided by frameworks like nose (which doesn't require all test modules to be importable from the top level). The load_tests protocol is an idea already in use by the Bzr test framework and similar protocols are in use in other frameworks. ---------- Added file: http://bugs.python.org/file14052/test_discovery.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6001> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com