mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21412)
This commit is contained in:
parent
61bb24a270
commit
96a6a6d42b
18 changed files with 154 additions and 134 deletions
|
@ -5,6 +5,7 @@ import gettext
|
|||
import unittest
|
||||
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
|
||||
|
||||
# TODO:
|
||||
|
@ -129,14 +130,14 @@ class GettextBaseTest(unittest.TestCase):
|
|||
fp.write(base64.decodebytes(UMO_DATA))
|
||||
with open(MMOFILE, 'wb') as fp:
|
||||
fp.write(base64.decodebytes(MMO_DATA))
|
||||
self.env = support.EnvironmentVarGuard()
|
||||
self.env = os_helper.EnvironmentVarGuard()
|
||||
self.env['LANGUAGE'] = 'xx'
|
||||
gettext._translations.clear()
|
||||
|
||||
def tearDown(self):
|
||||
self.env.__exit__()
|
||||
del self.env
|
||||
support.rmtree(os.path.split(LOCALEDIR)[0])
|
||||
os_helper.rmtree(os.path.split(LOCALEDIR)[0])
|
||||
|
||||
GNU_MO_DATA_ISSUE_17898 = b'''\
|
||||
3hIElQAAAAABAAAAHAAAACQAAAAAAAAAAAAAAAAAAAAsAAAAggAAAC0AAAAAUGx1cmFsLUZvcm1z
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue