mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fix for Python3: Python3 open() use 'rt' mode by default, and decoding by locale.getpreferredencoding(). In sphinx test, html output encoded by 'utf-8' but reading with syste-locale-setting-encode that cause UnicodeDecodeError.
This commit is contained in:
@@ -329,7 +329,7 @@ def test_html(app):
|
||||
for fname, paths in HTML_XPATH.iteritems():
|
||||
parser = NslessParser()
|
||||
parser.entity.update(htmlentitydefs.entitydefs)
|
||||
fp = open(os.path.join(app.outdir, fname))
|
||||
fp = open(os.path.join(app.outdir, fname), 'rb')
|
||||
try:
|
||||
etree = ET.parse(fp, parser)
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user