Unit testing multiprocessing code on Windows

Matt Chaput matt at whoosh.ca
Fri Feb 18 18:10:34 CET 2011


On 17/02/2011 8:22 PM, philip at semanchuk.com wrote:

> Hi Matt,
> I assume you're aware of this documentation, especially the item
> entitled "Safe importing of main module"?
>
> http://docs.python.org/release/2.6.6/library/multiprocessing.html#windows

Yes, but the thing is my code isn't __main__, my unittest classes are
being loaded by setup.py test or nosetests. And while I'm assured
multiprocessing doesn't duplicate the original command line, what I get
sure looks like it, because if I use "python setup.py test" that command 
seems to be re-run for every Process that starts, but if I use
"nosetests" then *that* seems to be re-run for every Process.

Matt



More information about the Python-list mailing list