diff options
Diffstat (limited to 'tests/test_ext_graphviz.py')
-rw-r--r-- | tests/test_ext_graphviz.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_ext_graphviz.py b/tests/test_ext_graphviz.py index f89a96860..a8de950ce 100644 --- a/tests/test_ext_graphviz.py +++ b/tests/test_ext_graphviz.py @@ -20,7 +20,7 @@ from sphinx.ext.graphviz import ClickableMapDefinition def test_graphviz_png_html(app, status, warning): app.builder.build_all() - content = (app.outdir / 'index.html').text() + content = (app.outdir / 'index.html').read_text() html = (r'<div class="figure align-default" .*?>\s*' r'<div class="graphviz"><img .*?/></div>\s*<p class="caption">' r'<span class="caption-text">caption of graph</span>.*</p>\s*</div>') @@ -51,7 +51,7 @@ def test_graphviz_png_html(app, status, warning): def test_graphviz_svg_html(app, status, warning): app.builder.build_all() - content = (app.outdir / 'index.html').text() + content = (app.outdir / 'index.html').read_text() html = (r'<div class=\"figure align-default\" .*?>\n' r'<div class="graphviz"><object data=\".*\.svg\".*>\n' @@ -91,7 +91,7 @@ def test_graphviz_svg_html(app, status, warning): def test_graphviz_latex(app, status, warning): app.builder.build_all() - content = (app.outdir / 'python.tex').text() + content = (app.outdir / 'python.tex').read_text() macro = ('\\\\begin{figure}\\[htbp\\]\n\\\\centering\n\\\\capstart\n\n' '\\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf}\n' '\\\\caption{caption of graph}\\\\label{.*}\\\\end{figure}') @@ -117,7 +117,7 @@ def test_graphviz_latex(app, status, warning): def test_graphviz_i18n(app, status, warning): app.builder.build_all() - content = (app.outdir / 'index.html').text() + content = (app.outdir / 'index.html').read_text() html = '<img src=".*?" alt="digraph {\n BAR -> BAZ\n}" class="graphviz" />' assert re.search(html, content, re.M) |