diff options
| author | Georg Brandl <georg@python.org> | 2011-05-15 11:15:20 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2011-05-15 11:15:20 +0200 |
| commit | 3c2662580a1b9127ae4c31d666d2fd0314e2a785 (patch) | |
| tree | 1cbbc7e4d2e9ae914799a29c9cdb74b853e59740 | |
| parent | 4fb8139f36e5cacd082603f268e8ea954b8d07df (diff) | |
| download | sphinx-git-3c2662580a1b9127ae4c31d666d2fd0314e2a785.tar.gz | |
Cleanup after pull from https://bitbucket.org/timmartin/sphinx
| -rwxr-xr-x | tests/run.py | 8 | ||||
| -rw-r--r-- | tests/test_build_html.py | 2 | ||||
| -rw-r--r-- | tests/util.py | 8 |
3 files changed, 8 insertions, 10 deletions
diff --git a/tests/run.py b/tests/run.py index efc657246..7d51c0718 100755 --- a/tests/run.py +++ b/tests/run.py @@ -29,20 +29,20 @@ sys.path.insert(0, path.join(path.dirname(__file__), path.pardir)) try: import nose except ImportError: - print("The nose package is needed to run the Sphinx test suite.") + print('The nose package is needed to run the Sphinx test suite.') sys.exit(1) try: import docutils except ImportError: - print("Sphinx requires the docutils package to be installed") + print('Sphinx requires the docutils package to be installed.') sys.exit(1) try: import jinja2 except ImportError: - print("Sphinx requires the jinja2 package to be installed") + print('Sphinx requires the jinja2 package to be installed.') sys.exit(1) -print("Running Sphinx test suite...") +print('Running Sphinx test suite...') nose.main() diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 7e68f8dbb..f544403de 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -11,8 +11,8 @@ import os import re -import htmlentitydefs import sys +import htmlentitydefs from StringIO import StringIO try: diff --git a/tests/util.py b/tests/util.py index f15481e7b..bd50bec05 100644 --- a/tests/util.py +++ b/tests/util.py @@ -193,10 +193,8 @@ def with_app(*args, **kwargs): def gen_with_app(*args, **kwargs): """ - Make a TestApp with args and kwargs, pass it to the test and clean up - properly. The wrapped function is assumed to be a generator and the - wrapper function is itself a generator that will iterate over the - values of the wrapped function and yield them. + Decorate a test generator to pass a TestApp as the first argument to the + test generator when it's executed. """ def generator(func): @wraps(func) @@ -226,7 +224,7 @@ def write_file(name, contents, encoding=None): contents = contents.encode('ascii') else: mode = 'w' - f = open(str(name), 'wb', encoding=encoding) + f = open(str(name), mode, encoding=encoding) f.write(contents) f.close() |
