diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-22 18:34:51 +0400 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-22 18:34:51 +0400 |
commit | 953b33d3f721e58ab48490d33c141df1e4dd25c1 (patch) | |
tree | 26bce4c2ef75b4ebe8422685d8962aa07978bad2 /tests/test_build_gettext.py | |
parent | 317930a7fbd49b50fb8a144161a698fcafeab91a (diff) | |
parent | 5f13479408785818ee8b85d4172314ea5578fde3 (diff) | |
download | sphinx-git-953b33d3f721e58ab48490d33c141df1e4dd25c1.tar.gz |
Merge
Diffstat (limited to 'tests/test_build_gettext.py')
-rw-r--r-- | tests/test_build_gettext.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_build_gettext.py b/tests/test_build_gettext.py index ca0ff0d2c..4062d9820 100644 --- a/tests/test_build_gettext.py +++ b/tests/test_build_gettext.py @@ -8,6 +8,7 @@ :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ +from __future__ import print_function import gettext import os @@ -63,8 +64,8 @@ def test_gettext(app): else: stdout, stderr = p.communicate() if p.returncode != 0: - print stdout - print stderr + print(stdout) + print(stderr) assert False, 'msginit exited with return code %s' % \ p.returncode assert (app.outdir / 'en_US.po').isfile(), 'msginit failed' @@ -77,8 +78,8 @@ def test_gettext(app): else: stdout, stderr = p.communicate() if p.returncode != 0: - print stdout - print stderr + print(stdout) + print(stderr) assert False, 'msgfmt exited with return code %s' % \ p.returncode assert (app.outdir / 'en' / 'LC_MESSAGES' / 'test_root.mo').isfile(), \ @@ -106,7 +107,7 @@ def test_gettext_index_entries(app): return None pot = (app.outdir / 'index_entries.pot').text(encoding='utf-8') - msgids = filter(None, map(msgid_getter, pot.splitlines())) + msgids = [_f for _f in map(msgid_getter, pot.splitlines()) if _f] expected_msgids = [ "i18n with index entries", |