summaryrefslogtreecommitdiff
path: root/tests/test_build_html.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-04-27 03:11:08 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-04-27 03:11:08 +0100
commit4674cc11c83c302102c167123de00a68b3d5dd88 (patch)
tree38c7a19f3621b4566de8a7eeefe64d4d72112d2a /tests/test_build_html.py
parent24e3b7c8c8c0a2d01ec2d2d4d04105bcb565e440 (diff)
downloadsphinx-git-4674cc11c83c302102c167123de00a68b3d5dd88.tar.gz
`.write_text(...)` -> `.write_text(..., encoding='utf8')`
Diffstat (limited to 'tests/test_build_html.py')
-rw-r--r--tests/test_build_html.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index 74051cd6e..571b6202c 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -696,7 +696,7 @@ def test_numfig_without_numbered_toctree_warn(app, warning):
# remove :numbered: option
index = (app.srcdir / 'index.rst').read_text(encoding='utf8')
index = re.sub(':numbered:.*', '', index)
- (app.srcdir / 'index.rst').write_text(index)
+ (app.srcdir / 'index.rst').write_text(index, encoding='utf8')
app.builder.build_all()
warnings = warning.getvalue()
@@ -784,7 +784,7 @@ def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect)
# remove :numbered: option
index = (app.srcdir / 'index.rst').read_text(encoding='utf8')
index = re.sub(':numbered:.*', '', index)
- (app.srcdir / 'index.rst').write_text(index)
+ (app.srcdir / 'index.rst').write_text(index, encoding='utf8')
if not app.outdir.listdir():
app.build()