mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-08-08 20:18:14 -05:00
test: Use read_text() and read_bytes()
This commit is contained in:
@@ -891,14 +891,14 @@ def test_build_domain_cpp_with_add_function_parentheses_is_True(app, status, war
|
||||
]
|
||||
|
||||
f = 'roles.html'
|
||||
t = (app.outdir / f).text()
|
||||
t = (app.outdir / f).read_text()
|
||||
for s in rolePatterns:
|
||||
check(s, t, f)
|
||||
for s in parenPatterns:
|
||||
check(s, t, f)
|
||||
|
||||
f = 'any-role.html'
|
||||
t = (app.outdir / f).text()
|
||||
t = (app.outdir / f).read_text()
|
||||
for s in parenPatterns:
|
||||
check(s, t, f)
|
||||
|
||||
@@ -934,14 +934,14 @@ def test_build_domain_cpp_with_add_function_parentheses_is_False(app, status, wa
|
||||
]
|
||||
|
||||
f = 'roles.html'
|
||||
t = (app.outdir / f).text()
|
||||
t = (app.outdir / f).read_text()
|
||||
for s in rolePatterns:
|
||||
check(s, t, f)
|
||||
for s in parenPatterns:
|
||||
check(s, t, f)
|
||||
|
||||
f = 'any-role.html'
|
||||
t = (app.outdir / f).text()
|
||||
t = (app.outdir / f).read_text()
|
||||
for s in parenPatterns:
|
||||
check(s, t, f)
|
||||
|
||||
@@ -951,7 +951,7 @@ def test_xref_consistency(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
test = 'xref_consistency.html'
|
||||
output = (app.outdir / test).text()
|
||||
output = (app.outdir / test).read_text()
|
||||
|
||||
def classes(role, tag):
|
||||
pattern = (r'{role}-role:.*?'
|
||||
|
||||
Reference in New Issue
Block a user