[Distutils] Testing with stubbed entry points?

Phillip J. Eby pje at telecommunity.com
Thu Mar 2 05:54:32 CET 2006


At 09:52 AM 2/23/2006 +0200, Iwan Vosloo wrote:
>"Phillip J. Eby" <pje at telecommunity.com> writes:
> > You then have to add that Distribution to a WorkingSet instance, and
> > you need to make your code use that WorkingSet instead of the
> > default working_set.
>
>Why can't I add the Distribution to the default working_set?

Well, you could, but then your test may end up inadvertently depending on 
some local sys.path quirk.  For a "pure" unit test, I'd want to use a 
WorkingSet with known contents, that's all.


>And... do I need to .activate() the distribution?

Not if you're not actually importing anything from the dummy egg, no.



More information about the Distutils-SIG mailing list