summaryrefslogtreecommitdiff
path: root/tests/test_quickstart.py
diff options
context:
space:
mode:
authorDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-04-29 20:34:08 +0200
committerDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-04-29 20:34:08 +0200
commit21376f21e7cee76761fccef6874c88c1b3f79e3a (patch)
tree6e5254e322d672673998b65b132bfabec41dfb71 /tests/test_quickstart.py
parent4adbc983503072918b058d6bfa6bca4fd64b86aa (diff)
downloadsphinx-git-21376f21e7cee76761fccef6874c88c1b3f79e3a.tar.gz
Don't use execfile() anymore
Diffstat (limited to 'tests/test_quickstart.py')
-rw-r--r--tests/test_quickstart.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py
index cb40d27cf..34c54f95a 100644
--- a/tests/test_quickstart.py
+++ b/tests/test_quickstart.py
@@ -85,7 +85,11 @@ def test_quickstart_defaults(tempdir):
conffile = tempdir / 'conf.py'
assert conffile.isfile()
ns = {}
- execfile(conffile, ns)
+ try:
+ f = open(conffile, 'U')
+ exec f in ns
+ finally:
+ f.close()
assert ns['extensions'] == []
assert ns['templates_path'] == ['_templates']
assert ns['source_suffix'] == '.rst'
@@ -138,7 +142,11 @@ def test_quickstart_all_answers(tempdir):
conffile = tempdir / 'source' / 'conf.py'
assert conffile.isfile()
ns = {}
- execfile(conffile, ns)
+ try:
+ f = open(conffile, 'U')
+ exec f in ns
+ finally:
+ f.close()
assert ns['extensions'] == ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
assert ns['templates_path'] == ['.templates']
assert ns['source_suffix'] == '.txt'