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

Marius Gedminas marius at gedmin.as
Tue Apr 21 04:55:56 PDT 2015


On Mon, Apr 20, 2015 at 02:10:29PM -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".

Ah, but what if the next user uses

[testenv]
omitenv = *
passenv = LANG LC_*

?

Marius Gedminas
-- 
Never reinvent the wheel unless you really need a square one. :^)
                -- Duncan Booth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 173 bytes
Desc: Digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150421/88354d47/attachment.pgp>


More information about the testing-in-python mailing list