[TIP] Tox and locales

Marius Gedminas marius at gedmin.as
Fri May 15 09:10:30 PDT 2015


On Fri, May 15, 2015 at 06:55:21AM +0000, holger krekel wrote:
> On Thu, May 14, 2015 at 11:34 +0100, Dougal Matthews wrote:
> > Turns out I just needed this!
> > https://testrun.org/tox/latest/example/basic.html#passing-down-environment-variables
> 
> I was considering adding "LANG" to the list of default passenv
> variables for tox-2.0 so that all testenv's would see the locale
> setting that is used with the tox invocation.  On the other hand it's
> not always needed and i think it's good to know for a project's tests
> that it has dependencies on running with a particular locale.

One of my tox-using projects broke because of this, and I took it as a
useful piece of knowledge, exactly like you suggest here.

BTW everyone: let's not focus solely on LANG for locale information.
LC_CTYPE and LC_ALL are also important (and override LANG, if they're
set).

Ideally any examples that pass through LANG ought to pass through LC_*
as well.  I'd submit a pull request for the tox docs linked in the quote
above if I weren't feeling tired after a long day (don't ask).

Marius Gedminas
-- 
This is, or so I'm told, a classic book. I can see why. It is long and it
requires a great effort to finish it. If you go through a great effort to
suffer for a long time, you are allowed to sneer at people who can't be
bothered. That's the surest sign of classic art.
		-- Lars Wirzenius
-------------- 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/20150515/49de0559/attachment.pgp>


More information about the testing-in-python mailing list