diff options
Diffstat (limited to 'tests/test_ext_graphviz.py')
-rw-r--r-- | tests/test_ext_graphviz.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_ext_graphviz.py b/tests/test_ext_graphviz.py index 45850f3ce..1c31e8eaf 100644 --- a/tests/test_ext_graphviz.py +++ b/tests/test_ext_graphviz.py @@ -20,8 +20,8 @@ def test_graphviz_html(app, status, warning): app.builder.build_all() content = (app.outdir / 'index.html').text() - html = ('<div class="figure" .*?>\s*<img .*?/>\s*<p class="caption">' - '<span class="caption-text">caption of graph</span>.*</p>\s*</div>') + html = (r'<div class="figure" .*?>\s*<img .*?/>\s*<p class="caption">' + r'<span class="caption-text">caption of graph</span>.*</p>\s*</div>') assert re.search(html, content, re.S) html = 'Hello <img .*?/>\n graphviz world' @@ -30,8 +30,8 @@ def test_graphviz_html(app, status, warning): html = '<img src=".*?" alt="digraph {\n bar -> baz\n}" />' assert re.search(html, content, re.M) - html = ('<div class="figure align-right" .*?>\s*<img .*?/>\s*<p class="caption">' - '<span class="caption-text">on right</span>.*</p>\s*</div>') + html = (r'<div class="figure align-right" .*?>\s*<img .*?/>\s*<p class="caption">' + r'<span class="caption-text">on right</span>.*</p>\s*</div>') assert re.search(html, content, re.S) @@ -41,16 +41,16 @@ def test_graphviz_latex(app, status, warning): app.builder.build_all() content = (app.outdir / 'SphinxTests.tex').text() - macro = ('\\\\begin{figure}\[htbp\]\n\\\\centering\n\\\\capstart\n\n' - '\\\\includegraphics{graphviz-\w+.pdf}\n' + macro = ('\\\\begin{figure}\\[htbp\\]\n\\\\centering\n\\\\capstart\n\n' + '\\\\includegraphics{graphviz-\\w+.pdf}\n' '\\\\caption{caption of graph}\\\\label{.*}\\\\end{figure}') assert re.search(macro, content, re.S) - macro = 'Hello \\\\includegraphics{graphviz-\w+.pdf} graphviz world' + macro = 'Hello \\\\includegraphics{graphviz-\\w+.pdf} graphviz world' assert re.search(macro, content, re.S) macro = ('\\\\begin{wrapfigure}{r}{0pt}\n\\\\centering\n' - '\\\\includegraphics{graphviz-\w+.pdf}\n' + '\\\\includegraphics{graphviz-\\w+.pdf}\n' '\\\\caption{on right}\\\\label{.*}\\\\end{wrapfigure}') assert re.search(macro, content, re.S) |