Exemple #1
0
 def test_doesnt_explode(self):
     # It's really hard to test that a system has a given locale, so at least
     # make sure we don't explode when we try to check it.
     try:
         dsl.hasAnyLocale(self.config, ['en_US.UTF-8'])
     except subprocess.CalledProcessError:
         self.fail("checking for hasLocale should not explode")
Exemple #2
0
 def test_localization_program_doesnt_compile(self):
     compilerIndex = findIndex(self.config.substitutions,
                               lambda x: x[0] == '%{cxx}')
     self.config.substitutions[compilerIndex] = (
         '%{cxx}', 'this-is-certainly-not-a-valid-compiler!!')
     self.assertRaises(
         dsl.ConfigurationCompilationError,
         lambda: dsl.hasAnyLocale(self.config, ['en_US.UTF-8']))
Exemple #3
0
 def test_nonexistent_locale(self):
     self.assertFalse(
         dsl.hasAnyLocale(self.config,
                          ['forsurethisisnotanexistinglocale']))
Exemple #4
0
 def test_nonexistent_locale(self):
     self.assertFalse(dsl.hasAnyLocale(self.config, ['for_sure_this_is_not_an_existing_locale']))