diff options
author | Alex Morega <alex@grep.ro> | 2013-07-07 11:47:48 +0200 |
---|---|---|
committer | Alex Morega <alex@grep.ro> | 2013-07-07 11:47:48 +0200 |
commit | bd743feefa4e1b14f0ba7ade45edd86a6c7e3a00 (patch) | |
tree | da04bfef7f310a55135b44c70ca25e1efab233db /tests | |
parent | 40f6467af578051da075623f2f463195354f1fe0 (diff) | |
download | babel-bd743feefa4e1b14f0ba7ade45edd86a6c7e3a00.tar.gz |
fix babel.support for py3 strings/bytes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_support.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_support.py b/tests/test_support.py index d20e9df..8c182fc 100644 --- a/tests/test_support.py +++ b/tests/test_support.py @@ -22,7 +22,7 @@ from datetime import date, datetime, timedelta from babel import support from babel.messages import Catalog from babel.messages.mofile import write_mo -from babel._compat import StringIO +from babel._compat import BytesIO @pytest.mark.usefixtures("os_environ") @@ -49,8 +49,8 @@ class TranslationsTestCase(unittest.TestCase): catalog1.add(ids, **kwargs) for ids, kwargs in messages2: catalog2.add(ids, **kwargs) - catalog1_fp = StringIO() - catalog2_fp = StringIO() + catalog1_fp = BytesIO() + catalog2_fp = BytesIO() write_mo(catalog1_fp, catalog1) catalog1_fp.seek(0) write_mo(catalog2_fp, catalog2) @@ -187,7 +187,7 @@ class TranslationsTestCase(unittest.TestCase): class NullTranslationsTestCase(unittest.TestCase): def setUp(self): - fp = StringIO() + fp = BytesIO() write_mo(fp, Catalog(locale='de')) fp.seek(0) self.translations = support.Translations(fp=fp) |