mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Move the setting of os.environ['LANGUAGE'] to setup(), and reset it to
'en' in teardown(). This way hopefully test_time.py won't fail.
This commit is contained in:
parent
d33d47401d
commit
65692578b7
1 changed files with 2 additions and 1 deletions
|
|
@ -7,7 +7,6 @@ def test_api_1(localedir, mofile):
|
||||||
print 'test api 1'
|
print 'test api 1'
|
||||||
|
|
||||||
# Test basic interface
|
# Test basic interface
|
||||||
os.environ['LANGUAGE'] = 'xx'
|
|
||||||
|
|
||||||
print 'installing gettext'
|
print 'installing gettext'
|
||||||
gettext.install('gettext', localedir)
|
gettext.install('gettext', localedir)
|
||||||
|
|
@ -132,8 +131,10 @@ def setup():
|
||||||
fp = open(MOFILE, 'wb')
|
fp = open(MOFILE, 'wb')
|
||||||
fp.write(base64.decodestring(GNU_MO_DATA))
|
fp.write(base64.decodestring(GNU_MO_DATA))
|
||||||
fp.close()
|
fp.close()
|
||||||
|
os.environ['LANGUAGE'] = 'xx'
|
||||||
|
|
||||||
def teardown():
|
def teardown():
|
||||||
|
os.environ['LANGUAGE'] = 'en'
|
||||||
os.unlink(MOFILE)
|
os.unlink(MOFILE)
|
||||||
os.removedirs(LOCALEDIR)
|
os.removedirs(LOCALEDIR)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue