[TIP] RFC: tox-2.0 to restrict/isolate env variables in test runs

holger krekel holger at merlinux.eu
Tue Jun 9 11:09:26 PDT 2015


Roy, David,

On Tue, Jun 09, 2015 at 11:14 -0500, Roy Wright wrote:
> On Jun 9, 2015, at 10:00 AM, David Cournapeau <cournape at gmail.com> wrote:
> 
> > I am late to the party, and I guess it is too late, but I am not convinced this is a good idea, at least not as a default (should be opt-in, not opt-out).
> > 
> > This breaks a lot of basic features, in a way that is fairly complicated to debug. E.g. with tox 2.0, os.path.expanduser("~") is now broken on windows because e.g. USERNAME is not propagated. Realistically, way too many programs depend on various environment variables.
> 
> If you are behind a firewall, you may need to pass in your proxy variables so pip can connect to pypi.python.org, even if you are using an internal index. I.e., tox fails to create a virtualenv. Not good. 
> 
> I'd prefer to be able to set options that affect all usages of a utility globally instead of needing to add to every project I want to test. 
> 
> I can understand the need to totally control the test environment. It's just that there are system needs that must be met before test needs. 

Would it help you if we introduce a TOX_PASSENV environment variable
(and maybe a command line option) that is honored in addition to 
the tox.ini values?  You could set that on a per-system basis.

holger


> Thank you for a cool utility. 
> 
> HTH
> 
> 
> A free society is a single class society where everyone has the same rights.
> 

-- 
about me:    http://holgerkrekel.net/about-me/
contracting: http://merlinux.eu



More information about the testing-in-python mailing list