Commits

Takayuki Shimizukawa  committed 15c9d21

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.

  • Participants
  • Parent commits db77864

Comments (0)

Files changed (1)

File tests/test_build_html.py

     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: