Fix test_linkcode.test_html fails with C locale and Python 3. Closes #1311

This commit is contained in:
Takayuki Shimizukawa 2013-11-17 03:39:27 +00:00
parent 02be06ac7f
commit d96de9d128
2 changed files with 4 additions and 5 deletions

View File

@ -28,6 +28,8 @@ Bugs fixed
* PR#176: Make sure setup_command test can always import Sphinx. Thanks to
Dmitry Shachnev.
* #1311: Fix test_linkcode.test_html fails with C locale and Python 3.
Release 1.2 beta3 (released Oct 3, 2013)
========================================

View File

@ -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