[TIP] Running functional tests frequently without installing frequently

Geoff Bache geoff.bache at gmail.com
Mon Nov 15 03:29:54 PST 2010

Thanks for all the suggestions everyone! I have a few things to try now.

On Sun, Nov 14, 2010 at 5:53 PM, Jorge Vargas <jorge.vargas at gmail.com> wrote:
> On Fri, Nov 12, 2010 at 12:45 PM, Geoff Bache <geoff.bache at gmail.com> wrote:
>> Hi all,
>> I asked this question on comp.lang.python but didn't get much of
>> answer, so I thought I'd see how others on this list deal with this
>> situation.
>> I like to test my programs very frequently, and by that I mean
>> actually run them from the command line rather than just unit testing.
>> For simple programs that is no problem, as I just run them from the
>> source tree. But for programs with a more complex setup.py, it's more
>> necessary to have a local virtualenv environment where I can install
>> it to before running it.
>> But the problem then is that I have to remember to run setup.py
>> install each time I run the tests, and it's easy to forget this step
>> and wonder why your changes don't take effect. It also feels more like
>> the bad old days of having to run a compiler first :)
>> 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
>> How have other people addressed this issue?
> as others have said
> python setup.py develop or even better
> pip install -e .
> Solves your problem.
> after that I personally use fabric to set everything up if it gets complicated.
> And then give that to hudson when you get bored of running the test manually :)
> To everyone that suggested tox thanks, I had no idea it existed! looks
> really nice.
>> Regards,
>> Geoff
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list