diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-04-27 03:04:19 +0100 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-04-27 03:04:19 +0100 |
commit | 24e3b7c8c8c0a2d01ec2d2d4d04105bcb565e440 (patch) | |
tree | 72862fd42abc102ff99ac35687d4cc7af17b0c2d /tests/test_domain_py.py | |
parent | 8866adeacfb045c97302cc9c7e3b60dec5ca38fd (diff) | |
download | sphinx-git-24e3b7c8c8c0a2d01ec2d2d4d04105bcb565e440.tar.gz |
`.read_text()` -> `.read_text(encoding='utf8')`
Diffstat (limited to 'tests/test_domain_py.py')
-rw-r--r-- | tests/test_domain_py.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py index 4205ada13..61f595c23 100644 --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -131,7 +131,7 @@ def test_domain_py_xrefs(app, status, warning): def test_domain_py_xrefs_abbreviations(app, status, warning): app.builder.build_all() - content = (app.outdir / 'abbr.html').read_text() + content = (app.outdir / 'abbr.html').read_text(encoding='utf8') assert re.search(r'normal: <a .* href="module.html#module_a.submodule.ModTopLevel.' r'mod_child_1" .*><.*>module_a.submodule.ModTopLevel.mod_child_1\(\)' r'<.*></a>', @@ -186,7 +186,7 @@ def test_domain_py_objects(app, status, warning): def test_resolve_xref_for_properties(app, status, warning): app.builder.build_all() - content = (app.outdir / 'module.html').read_text() + content = (app.outdir / 'module.html').read_text(encoding='utf8') assert ('Link to <a class="reference internal" href="#module_a.submodule.ModTopLevel.prop"' ' title="module_a.submodule.ModTopLevel.prop">' '<code class="xref py py-attr docutils literal notranslate"><span class="pre">' @@ -234,7 +234,7 @@ def test_domain_py_find_obj(app, status, warning): def test_domain_py_canonical(app, status, warning): app.builder.build_all() - content = (app.outdir / 'canonical.html').read_text() + content = (app.outdir / 'canonical.html').read_text(encoding='utf8') assert ('<a class="reference internal" href="#canonical.Foo" title="canonical.Foo">' '<code class="xref py py-class docutils literal notranslate">' '<span class="pre">Foo</span></code></a>' in content) @@ -1315,7 +1315,7 @@ def test_noindexentry(app): @pytest.mark.sphinx('html', testroot='domain-py-python_use_unqualified_type_names') def test_python_python_use_unqualified_type_names(app, status, warning): app.build() - content = (app.outdir / 'index.html').read_text() + content = (app.outdir / 'index.html').read_text(encoding='utf8') assert ('<span class="n"><a class="reference internal" href="#foo.Name" title="foo.Name">' '<span class="pre">Name</span></a></span>' in content) assert '<span class="n"><span class="pre">foo.Age</span></span>' in content @@ -1328,7 +1328,7 @@ def test_python_python_use_unqualified_type_names(app, status, warning): confoverrides={'python_use_unqualified_type_names': False}) def test_python_python_use_unqualified_type_names_disabled(app, status, warning): app.build() - content = (app.outdir / 'index.html').read_text() + content = (app.outdir / 'index.html').read_text(encoding='utf8') assert ('<span class="n"><a class="reference internal" href="#foo.Name" title="foo.Name">' '<span class="pre">foo.Name</span></a></span>' in content) assert '<span class="n"><span class="pre">foo.Age</span></span>' in content |