]> granicus.if.org Git - python/commitdiff
Move the setting of os.environ['LANGUAGE'] to setup(), and reset it to
authorGuido van Rossum <guido@python.org>
Sat, 20 Jul 2002 00:36:38 +0000 (00:36 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 20 Jul 2002 00:36:38 +0000 (00:36 +0000)
'en' in teardown().  This way hopefully test_time.py won't fail.

Lib/test/test_gettext.py

index ddad86b5c454afad7308e879bd415a4dfdbaca59..08787d0636c74070989a4636cb78486e378ede2f 100644 (file)
@@ -7,7 +7,6 @@ def test_api_1(localedir, mofile):
     print 'test api 1'
 
     # Test basic interface
-    os.environ['LANGUAGE'] = 'xx'
 
     print 'installing gettext'
     gettext.install('gettext', localedir)
@@ -132,8 +131,10 @@ def setup():
     fp = open(MOFILE, 'wb')
     fp.write(base64.decodestring(GNU_MO_DATA))
     fp.close()
+    os.environ['LANGUAGE'] = 'xx'
 
 def teardown():
+    os.environ['LANGUAGE'] = 'en'
     os.unlink(MOFILE)
     os.removedirs(LOCALEDIR)