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

holger krekel holger at merlinux.eu
Tue Apr 21 04:43:36 PDT 2015


On Mon, Apr 20, 2015 at 14:10 -0400, Barry Warsaw wrote:
> On Apr 19, 2015, at 07:31 AM, holger krekel wrote:
> 
> >If you want to transfer any other variables you'd have to use a new "passenv"
> >setting.  For example to pass through the content of LANG (used for locale
> >settings) and typical home-directory settings (on win32 and unix):
> >
> >    [testenv]
> >    passenv = LANG HOME HOMEDIR HOMEDRIVE
> 
> This seems pretty useful and I like being able to avoid hidden environment
> dependencies.
> 
> I wonder if it also makes sense to have an 'omitenv' option, where the default
> would be:
> 
> [testenv]
> omitenv = *
> 
> but then I could do something like:
> 
> [testenv]
> passenv = *
> omitenv = SYSTEMIMAGE*
> 
> to tailor the environment to pass all envars except those that start with
> "SYSTEMIMAGE".

I'd prefer to just go for ``passenv`` for now.  Having a positive list
is IMO better practise than listing negatives (and arguably the wildcarding 
is already questionable in this respect).

best,
holger

> Cheers,
> -Barry



> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


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



More information about the testing-in-python mailing list