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 c5349d0fa..649cf1861 100644 --- a/tests/test_ext_graphviz.py +++ b/tests/test_ext_graphviz.py @@ -13,7 +13,7 @@ from sphinx.ext.graphviz import ClickableMapDefinition def test_graphviz_png_html(app, status, warning): app.builder.build_all() - content = (app.outdir / 'index.html').read_text() + content = (app.outdir / 'index.html').read_text(encoding='utf8') if docutils.__version_info__ < (0, 17): html = (r'<div class="figure align-default" .*?>\s*' r'<div class="graphviz"><img .*?/></div>\s*<p class="caption">' @@ -56,7 +56,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').read_text() + content = (app.outdir / 'index.html').read_text(encoding='utf8') if docutils.__version_info__ < (0, 17): html = (r'<div class=\"figure align-default\" .*?>\n' @@ -118,7 +118,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').read_text() + content = (app.outdir / 'python.tex').read_text(encoding='utf8') macro = ('\\\\begin{figure}\\[htbp\\]\n\\\\centering\n\\\\capstart\n\n' '\\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf}\n' '\\\\caption{caption of graph}\\\\label{.*}\\\\end{figure}') @@ -144,7 +144,7 @@ def test_graphviz_latex(app, status, warning): def test_graphviz_i18n(app, status, warning): app.builder.build_all() - content = (app.outdir / 'index.html').read_text() + content = (app.outdir / 'index.html').read_text(encoding='utf8') html = '<img src=".*?" alt="digraph {\n BAR -> BAZ\n}" class="graphviz" />' assert re.search(html, content, re.M) |