.read_text() -> .read_text(encoding='utf8')

This commit is contained in:
Adam Turner
2022-04-27 03:04:19 +01:00
parent 8866adeacf
commit 24e3b7c8c8
42 changed files with 363 additions and 363 deletions

View File

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