[TIP] Bug when testing nested virtual environments under Tox
andre.l.caron at gmail.com
Sun Jan 17 20:09:04 PST 2016
I hit this really weird issue today and I'm hoping someone on this list can
I'm working on a Python program that will remotely run Heroku-style apps
(pet experiment :-).
This program needs to:
1) download the app's source code archive (zip, tar, etc.);
2) unpack the application source archive;
3) create a new virtual environment;
4) install dependencies;
5) run the command specified in the Procfile.
I have something that works, but step #4 consistently fails in the test
suite when run under Tox.
After a bit of digging, it seems that the virtual environment generated in
step #3 is in a strange state: the activate script is not executable and
pip is missing.
In the hope of understanding what's wrong, I got the simplest possible
example that demonstrates the issue. I have a Bash script that works, a
simple Python script that works and a minimalist Tox project that fails.
I put up a project on GitHub with these in order to share them with anybody
who might be able to help. Here is the link:
AFAICT, these recipes are all equivalent, but the Tox project fails for me
(tried with Tox 1.9 and 2.3.1 with same results).
Since it only fails under Tox, I'm assuming Tox is doing something that
affects the behavior of virtual environment creation, but I can't figure
If anybody can take a few minutes to check out the project, try the scripts
and give me a few ideas, no matter how crazy they sound, I'd be **really**
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python