MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / test_localization_paths

Method test_localization_paths

tests/TestUnix.py:563–577  ·  view source on GitHub ↗

Unit test for localization_paths()

(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 3

add_xmlMethod · 0.80
localization_pathsMethod · 0.80
assertLExistsMethod · 0.80

Tested by

no test coverage detected