From ccd7381d388fb84bdaf6f25cf69d2306a500961a Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 16 Feb 2020 20:43:51 +0900 Subject: [PATCH] test: Use Path.read_text() instead --- tests/test_build_dirhtml.py | 2 +- tests/test_domain_py.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_dirhtml.py b/tests/test_build_dirhtml.py index 715db1146..6e2cdb0cb 100644 --- a/tests/test_build_dirhtml.py +++ b/tests/test_build_dirhtml.py @@ -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 diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py index f78c1e9d8..98736dae9 100644 --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -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 ' ''