diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2012-05-02 15:55:11 +0900 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2012-05-02 15:55:11 +0900 |
| commit | c443d23bbaaed6c05c1b55b50e3a4ac0ae89a70e (patch) | |
| tree | dfae6e41145bd2ae6b113c4ff89d0d4044ab3650 /tests | |
| parent | dc95b9355ea0f5b6e948a305de5fc703cef0453c (diff) | |
| download | sphinx-c443d23bbaaed6c05c1b55b50e3a4ac0ae89a70e.tar.gz | |
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.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_build_html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 6812257b..62bd5a88 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -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: |
