diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-11-14 10:50:15 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-11-14 10:50:15 +0100 |
| commit | 550ddc66b496473c8ee282c7ab6be5885a359d75 (patch) | |
| tree | 03cb8eaccb5aad52db8181d97e43f3735b6362a5 /tests | |
| parent | 1620c27936718a87bbc8acce7886ef20fee2b3fe (diff) | |
Fixed #19272 -- Fixed gettext_lazy returned type on Python 2
Thanks tyrion for the report.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/i18n/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py index 4054f85ef0..2e0c097a19 100644 --- a/tests/regressiontests/i18n/tests.py +++ b/tests/regressiontests/i18n/tests.py @@ -83,6 +83,10 @@ class TranslationTests(TestCase): s4 = ugettext_lazy('Some other string') self.assertEqual(False, s == s4) + if not six.PY3: + # On Python 2, gettext_lazy should not transform a bytestring to unicode + self.assertEqual(gettext_lazy(b"test").upper(), b"TEST") + def test_lazy_pickle(self): s1 = ugettext_lazy("test") self.assertEqual(six.text_type(s1), "test") |
