mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-08-10 04:58:20 -05:00
.read_text() -> .read_text(encoding='utf8')
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user