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

Method test_switch_language_twice

tests/TestLanguage.py:82–97  ·  view source on GitHub ↗

English should still work after switching twice

(self)

Source from the content-addressed store, hash-verified

80
81 @skipIfMissingPo
82 def test_switch_language_twice(self):
83 """English should still work after switching twice"""
84
85 options.set('auto_detect_lang', True)
86 options.set('forced_language', '')
87 setup_translation()
88 self.assertEqual(get_text('Preview'), 'Preview')
89
90 options.set('auto_detect_lang', False)
91 options.set('forced_language', 'es')
92 setup_translation()
93 self.assertIn(get_text('Preview'), ('Vista previa', 'Previsualizar'))
94
95 options.set('forced_language', 'en')
96 setup_translation()
97 self.assertEqual(get_text('Preview'), 'Preview')
98
99 def test_get_text_all(self):
100 """Test get_text across all languages"""

Callers

nothing calls this directly

Calls 3

setup_translationFunction · 0.90
get_textFunction · 0.90
setMethod · 0.45

Tested by

no test coverage detected