diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-01 11:58:51 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-01 11:58:51 +0900 |
commit | 4dd8b1022f581e8e42db520eb1061f064cbdf63f (patch) | |
tree | df4d2f69233f91aff7b9d3e3dee58c50d0991c2e /tests/test_ext_todo.py | |
parent | 7d6374d983cc757e8bb7911da13f2dce7d69ec36 (diff) | |
download | sphinx-git-4dd8b1022f581e8e42db520eb1061f064cbdf63f.tar.gz |
test: Use read_text() and read_bytes()
Diffstat (limited to 'tests/test_ext_todo.py')
-rw-r--r-- | tests/test_ext_todo.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_ext_todo.py b/tests/test_ext_todo.py index 8c00ef088..7b4fdeabe 100644 --- a/tests/test_ext_todo.py +++ b/tests/test_ext_todo.py @@ -29,7 +29,7 @@ def test_todo(app, status, warning): app.builder.build_all() # check todolist - content = (app.outdir / 'index.html').text() + content = (app.outdir / 'index.html').read_text() assert ('<p class="admonition-title">Todo</p>\n' '<p>todo in foo</p>') in content @@ -37,7 +37,7 @@ def test_todo(app, status, warning): '<p>todo in bar</p>') in content # check todo - content = (app.outdir / 'foo.html').text() + content = (app.outdir / 'foo.html').read_text() assert ('<p class="admonition-title">Todo</p>\n' '<p>todo in foo</p>') in content @@ -67,7 +67,7 @@ def test_todo_not_included(app, status, warning): app.builder.build_all() # check todolist - content = (app.outdir / 'index.html').text() + content = (app.outdir / 'index.html').read_text() assert ('<p class="admonition-title">Todo</p>\n' '<p>todo in foo</p>') not in content @@ -75,7 +75,7 @@ def test_todo_not_included(app, status, warning): '<p>todo in bar</p>') not in content # check todo - content = (app.outdir / 'foo.html').text() + content = (app.outdir / 'foo.html').read_text() assert ('<p class="admonition-title">Todo</p>\n' '<p>todo in foo</p>') not in content @@ -102,7 +102,7 @@ def test_todo_valid_link(app, status, warning): # Ensure the LaTeX output is built. app.builder.build_all() - content = (app.outdir / 'python.tex').text() + content = (app.outdir / 'python.tex').read_text() # Look for the link to foo. Note that there are two of them because the # source document uses todolist twice. We could equally well look for links |