diff options
Diffstat (limited to 'tests/test_linkcode.py')
-rw-r--r-- | tests/test_linkcode.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/test_linkcode.py b/tests/test_linkcode.py index 507cd9ce..190c3bf2 100644 --- a/tests/test_linkcode.py +++ b/tests/test_linkcode.py @@ -12,15 +12,12 @@ import os from util import with_app + @with_app(srcdir='(temp)', buildername='html', tags=['test_linkcode']) def test_html(app): app.builder.build_all() - fp = open(os.path.join(app.outdir, 'objects.html'), 'r') - try: - stuff = fp.read() - finally: - fp.close() + stuff = (app.outdir / 'objects.html').text(encoding='utf-8') assert 'http://foobar/source/foolib.py' in stuff assert 'http://foobar/js/' in stuff |