(self)
| 29 | class CompilationTest(unittest.TestCase): |
| 30 | |
| 31 | def test_compilation(self): |
| 32 | self.maxDiff = None |
| 33 | with temp_cwd(): |
| 34 | for po_file in data_dir.glob('*.po'): |
| 35 | with self.subTest(po_file=po_file): |
| 36 | mo_file = po_file.with_suffix('.mo') |
| 37 | with open(mo_file, 'rb') as f: |
| 38 | expected = GNUTranslations(f) |
| 39 | |
| 40 | tmp_mo_file = mo_file.name |
| 41 | compile_messages(po_file, tmp_mo_file) |
| 42 | with open(tmp_mo_file, 'rb') as f: |
| 43 | actual = GNUTranslations(f) |
| 44 | |
| 45 | self.assertDictEqual(actual._catalog, expected._catalog) |
| 46 | |
| 47 | def test_binary_header(self): |
| 48 | with temp_cwd(): |
nothing calls this directly
no test coverage detected