Pure python run-tests
Andy Isaacson
adi at hexapodia.org
Wed Apr 19 23:01:40 UTC 2006
On Wed, Apr 19, 2006 at 05:31:20PM -0500, Matt Mackall wrote:
> > # Reset some environment variables to well-known values
> > os.environ["LANG"] = "C"
> > os.environ["LC_CTYPE"] = "C"
> > os.environ["LC_NUMERIC"] = "C"
> > os.environ["LC_TIME"] = "C"
> > os.environ["LC_COLLATE"] = "C"
> > os.environ["LC_MONETARY"] = "C"
> > os.environ["LC_MESSAGES"] = "C"
> > os.environ["LC_PAPER"] = "C"
> > os.environ["LC_NAME"] = "C"
> > os.environ["LC_ADDRESS"] = "C"
> > os.environ["LC_TELEPHONE"] = "C"
> > os.environ["LC_MEASUREMENT"] = "C"
> > os.environ["LC_IDENTIFICATION"] = "C"
>
> Yuck. Wants a loop or something.
Why not just do the simplest thing and do
os.environ['LANG'] = 'C'
for var in os.environ.keys():
if var[0:3] == 'LC_': del os.environ[var]
-andy
More information about the Mercurial
mailing list