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")
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']))
def test_nonexistent_locale(self): self.assertFalse( dsl.hasAnyLocale(self.config, ['forsurethisisnotanexistinglocale']))
def test_nonexistent_locale(self): self.assertFalse(dsl.hasAnyLocale(self.config, ['for_sure_this_is_not_an_existing_locale']))