Unit test for localization_paths()
(self)
| 561 | |
| 562 | @common.skipIfWindows |
| 563 | def test_localization_paths(self): |
| 564 | """Unit test for localization_paths()""" |
| 565 | configpath = parseString( |
| 566 | '<path location="/usr/share/locale/" filter="*" />').firstChild |
| 567 | self.locales.add_xml(configpath) |
| 568 | counter = 0 |
| 569 | for path in self.locales.localization_paths(['en', 'en_AU', 'en_CA', 'en_GB']): |
| 570 | self.assertLExists(path) |
| 571 | self.assertTrue(path.startswith('/usr/share/locale')) |
| 572 | # /usr/share/locale/en_* should be ignored |
| 573 | self.assertEqual(path.find('/en_'), -1, 'expected path ' + path + |
| 574 | ' to not contain /en_') |
| 575 | counter += 1 |
| 576 | self.assertGreater(counter, 0, 'Zero files deleted by localization cleaner. ' + |
| 577 | 'This may be an error unless you really deleted all the files.') |
| 578 | |
| 579 | @common.skipIfWindows |
| 580 | def test_fakelocalizationdirs(self): |
nothing calls this directly
no test coverage detected