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