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_ext_coverage.py | |
parent | 8866adeacfb045c97302cc9c7e3b60dec5ca38fd (diff) | |
download | sphinx-git-24e3b7c8c8c0a2d01ec2d2d4d04105bcb565e440.tar.gz |
`.read_text()` -> `.read_text(encoding='utf8')`
Diffstat (limited to 'tests/test_ext_coverage.py')
-rw-r--r-- | tests/test_ext_coverage.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_ext_coverage.py b/tests/test_ext_coverage.py index ee179a86b..a7728a82d 100644 --- a/tests/test_ext_coverage.py +++ b/tests/test_ext_coverage.py @@ -9,7 +9,7 @@ import pytest def test_build(app, status, warning): app.builder.build_all() - py_undoc = (app.outdir / 'python.txt').read_text() + py_undoc = (app.outdir / 'python.txt').read_text(encoding='utf8') assert py_undoc.startswith('Undocumented Python objects\n' '===========================\n') assert 'autodoc_target\n--------------\n' in py_undoc @@ -22,7 +22,7 @@ def test_build(app, status, warning): assert "undocumented py" not in status.getvalue() - c_undoc = (app.outdir / 'c.txt').read_text() + c_undoc = (app.outdir / 'c.txt').read_text(encoding='utf8') assert c_undoc.startswith('Undocumented C API elements\n' '===========================\n') assert 'api.h' in c_undoc @@ -46,7 +46,7 @@ def test_build(app, status, warning): @pytest.mark.sphinx('coverage', testroot='ext-coverage') def test_coverage_ignore_pyobjects(app, status, warning): app.builder.build_all() - actual = (app.outdir / 'python.txt').read_text() + actual = (app.outdir / 'python.txt').read_text(encoding='utf8') expected = '''Undocumented Python objects =========================== coverage_not_ignored |