mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test: Use Path.read_text() instead
This commit is contained in:
parent
57d63ab50b
commit
ccd7381d38
@ -25,7 +25,7 @@ def test_dirhtml(app, status, warning):
|
||||
assert (app.outdir / 'foo/foo_2/index.html').exists()
|
||||
assert (app.outdir / 'bar/index.html').exists()
|
||||
|
||||
content = (app.outdir / 'index.html').text()
|
||||
content = (app.outdir / 'index.html').read_text()
|
||||
assert 'href="foo/"' in content
|
||||
assert 'href="foo/foo_1/"' in content
|
||||
assert 'href="foo/foo_2/"' in content
|
||||
|
@ -168,7 +168,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').text()
|
||||
content = (app.outdir / 'module.html').read_text()
|
||||
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">'
|
||||
|
Loading…
Reference in New Issue
Block a user