[TIP] Running functional tests frequently without installing frequently

Michael Foord fuzzyman at voidspace.org.uk
Fri Nov 12 09:01:49 PST 2010


On 12/11/2010 16:45, Geoff Bache wrote:
> Hi all,
>
> [snip...]
> I've fixed this by installing once, and then going into my virtualenv
> and replacing the installed package with a symbolic link back to the
> original source code. That way I can avoid the install step most of
> the time. But it feels like rather a hack. Other strategies seem to be
>
> - do everything possible to make programs always runnable directly
> from the source tree
> - write some kind of wrapper script
>

Making tests runnable from the source tree is ideal.

You can also use a pth file in your python install to add the working 
tree to sys.path. This is what I do for packages I frequently work on. A 
hack really though.

Another alternative is to use tox for testing. tox will create a 
virtualenv for you (caching the virtualenv so it is only done once per 
machine per version of Python) and then locally install your package 
into the virtualenv from the tree and run the tests.

All the best,

Michael


> How have other people addressed this issue?
>
> Regards,
> Geoff
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


-- 

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.




More information about the testing-in-python mailing list