mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
.read_text() -> .read_text(encoding='utf8')
This commit is contained in:
@@ -9,7 +9,7 @@ import pytest
|
||||
def test_autosectionlabel_html(app, status, warning, skipped_labels=False):
|
||||
app.builder.build_all()
|
||||
|
||||
content = (app.outdir / 'index.html').read_text()
|
||||
content = (app.outdir / 'index.html').read_text(encoding='utf8')
|
||||
html = ('<li><p><a class="reference internal" href="#introduce-of-sphinx">'
|
||||
'<span class=".*?">Introduce of Sphinx</span></a></p></li>')
|
||||
assert re.search(html, content, re.S)
|
||||
@@ -53,7 +53,7 @@ def test_autosectionlabel_prefix_document_html(app, status, warning):
|
||||
def test_autosectionlabel_maxdepth(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
content = (app.outdir / 'index.html').read_text()
|
||||
content = (app.outdir / 'index.html').read_text(encoding='utf8')
|
||||
|
||||
# depth: 1
|
||||
html = ('<li><p><a class="reference internal" href="#test-ext-autosectionlabel">'
|
||||
|
||||
Reference in New Issue
Block a user