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

Barry Warsaw barry at python.org
Mon Apr 20 11:10:29 PDT 2015


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".

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150420/3fe9e9a8/attachment.pgp>


More information about the testing-in-python mailing list