diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-19 14:17:10 +0400 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-19 14:17:10 +0400 |
commit | 344417db950d6e816ab2efb21737c2bdf9d1ad53 (patch) | |
tree | 97b00b55be0e28a73399acc0f80e21e6a4e24b28 /tests/test_build_texinfo.py | |
parent | 59b355edaa4f17aff910bf2371526d5ce46fb648 (diff) | |
download | sphinx-344417db950d6e816ab2efb21737c2bdf9d1ad53.tar.gz |
Modernize the code now that Python 2.5 is no longer supported
- Use print function instead of print statement;
- Use new exception handling;
- Use in operator instead of has_key();
- Do not use tuple arguments in functions;
- Other miscellaneous improvements.
This is based on output of `futurize --stage1`, with some
manual corrections.
Diffstat (limited to 'tests/test_build_texinfo.py')
-rw-r--r-- | tests/test_build_texinfo.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_build_texinfo.py b/tests/test_build_texinfo.py index bf3cc49f..60c768bc 100644 --- a/tests/test_build_texinfo.py +++ b/tests/test_build_texinfo.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 os import re @@ -61,8 +62,8 @@ def test_texinfo(app): stdout, stderr = p.communicate() retcode = p.returncode if retcode != 0: - print stdout - print stderr + print(stdout) + print(stderr) del app.cleanup_trees[:] assert False, 'makeinfo exited with return code %s' % retcode finally: |