En Thu, 20 Dec 2007 00:33:00 -0300, Noah <[EMAIL PROTECTED]> escribió:
> I'm trying to use the trace module to build coverage files for > a multi-threaded program. > > http://docs.python.org/lib/module-trace.html > > I test my application using trace.py from the command-line like this: > > /usr/lib/python2.5/trace.py --missing --count --summary tools/ > testall.py > > When I examine the *.cover files that are generated after a test run > I do not see coverage information for the methods that were run > in a separate thread. How can I collect coverage information for > methods that only run in a separate thread (never in the main thread)? There is a threading.settrace function, which sets the trace function for every thread just before it is started. I don't know if the trace module allows for multiple threads, or will just crash :), but in any case if one were to add support for this scenario, that would be the starting point. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list