(cls)
| 174 | class GettextBaseTest(unittest.TestCase): |
| 175 | @classmethod |
| 176 | def setUpClass(cls): |
| 177 | cls.addClassCleanup(os_helper.rmtree, os.path.split(LOCALEDIR)[0]) |
| 178 | if not os.path.isdir(LOCALEDIR): |
| 179 | os.makedirs(LOCALEDIR) |
| 180 | with open(MOFILE, 'wb') as fp: |
| 181 | fp.write(base64.decodebytes(GNU_MO_DATA)) |
| 182 | with open(MOFILE_BAD_MAGIC_NUMBER, 'wb') as fp: |
| 183 | fp.write(base64.decodebytes(GNU_MO_DATA_BAD_MAGIC_NUMBER)) |
| 184 | with open(MOFILE_BAD_MAJOR_VERSION, 'wb') as fp: |
| 185 | fp.write(base64.decodebytes(GNU_MO_DATA_BAD_MAJOR_VERSION)) |
| 186 | with open(MOFILE_BAD_MINOR_VERSION, 'wb') as fp: |
| 187 | fp.write(base64.decodebytes(GNU_MO_DATA_BAD_MINOR_VERSION)) |
| 188 | with open(MOFILE_CORRUPT, 'wb') as fp: |
| 189 | fp.write(base64.decodebytes(GNU_MO_DATA_CORRUPT)) |
| 190 | with open(MOFILE_BIG_ENDIAN, 'wb') as fp: |
| 191 | fp.write(base64.decodebytes(GNU_MO_DATA_BIG_ENDIAN)) |
| 192 | with open(UMOFILE, 'wb') as fp: |
| 193 | fp.write(base64.decodebytes(UMO_DATA)) |
| 194 | with open(MMOFILE, 'wb') as fp: |
| 195 | fp.write(base64.decodebytes(MMO_DATA)) |
| 196 | |
| 197 | def setUp(self): |
| 198 | self.env = self.enterContext(os_helper.EnvironmentVarGuard()) |
nothing calls this directly
no test coverage detected