[Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/ (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Wed Nov 3 20:56:51 CET 2010


Le mercredi 03 novembre 2010 à 15:48 -0400, Jesse Noller a écrit :

On Wed, Nov 3, 2010 at 3:45 PM, Antoine Pitrou <solipsis at pitrou.net> wrote: > On Wed, 03 Nov 2010 19:26:53 +0000 > Michael Foord <fuzzyman at voidspace.org.uk> wrote: >> >> Antoine is firmly of the opinion that making TestCase instances >> unpickleable is a feature... > > Apparently you didn't really understand me. I'm of the opinion that > making TestCase instances pickleable is useless if that pickling > doesn't have well-defined semantics. And I wonder what the semantics of > pickling a TestCase could be, and what the use cases are. > > Regards > > Antoine. >

Splitting groups of tests to run in parallel via multiple processes is a pretty good use case.

Indeed, but it implies a lot of things about TestCase instances, which could have additional non-pickleable attributes (e.g. file objects). You'd better pickle the TestCase class instead, or simply the module name as we do with regrtest -jN.

Regards

Antoine.



More information about the Python-Dev mailing list