diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2013-02-10 15:25:45 +0900 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2013-02-10 15:25:45 +0900 |
| commit | a24ce1a4bb568c7d23879cfc46677cc105b553f6 (patch) | |
| tree | 0cddde06dd0410a72f5ed7ae3da6d52dfbc403b6 /tests/test_quickstart.py | |
| parent | da7ae91eaeeab430993f9e9dc20d93d5d4ed3975 (diff) | |
| download | sphinx-a24ce1a4bb568c7d23879cfc46677cc105b553f6.tar.gz | |
conf.py now accept CRLF end-of-line.
Diffstat (limited to 'tests/test_quickstart.py')
| -rw-r--r-- | tests/test_quickstart.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index ff1f7568..69839da9 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -16,6 +16,7 @@ from util import * from sphinx import quickstart as qs from sphinx.util.console import nocolor, coloron +from sphinx.util.pycompat import execfile_ def setup_module(): nocolor() @@ -110,12 +111,7 @@ def test_quickstart_defaults(tempdir): conffile = tempdir / 'conf.py' assert conffile.isfile() ns = {} - f = open(conffile, 'rbU') - try: - code = compile(f.read(), conffile, 'exec') - finally: - f.close() - exec code in ns + execfile_(conffile, ns) assert ns['extensions'] == [] assert ns['templates_path'] == ['_templates'] assert ns['source_suffix'] == '.rst' @@ -170,12 +166,7 @@ def test_quickstart_all_answers(tempdir): conffile = tempdir / 'source' / 'conf.py' assert conffile.isfile() ns = {} - f = open(conffile, 'rbU') - try: - code = compile(f.read(), conffile, 'exec') - finally: - f.close() - exec code in ns + execfile_(conffile, ns) assert ns['extensions'] == ['sphinx.ext.autodoc', 'sphinx.ext.doctest'] assert ns['templates_path'] == ['.templates'] assert ns['source_suffix'] == '.txt' |
