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

Method test_get_text_fallback

tests/TestLanguage.py:123–130  ·  view source on GitHub ↗

Language code x_Y should fall back to x

(self)

Source from the content-addressed store, hash-verified

121
122 @skipIfMissingPo
123 def test_get_text_fallback(self):
124 """Language code x_Y should fall back to x"""
125 for lang_id in ('es', 'es_XX', 'es_ES', 'es_ES.UTF-8', 'es_1235'):
126 options.set('forced_language', lang_id)
127 self.assertEqual(get_active_language_code(), lang_id)
128 setup_translation()
129 self.assertIn(get_text('Preview'),
130 ('Vista previa', 'Previsualizar'))
131
132 def test_options_import_failure(self):
133 """Test handling of failed Options import in language detection"""

Callers

nothing calls this directly

Calls 4

get_active_language_codeFunction · 0.90
setup_translationFunction · 0.90
get_textFunction · 0.90
setMethod · 0.45

Tested by

no test coverage detected