mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix `test_graphviz_svg_html
` on Windows
This commit is contained in:
parent
4b082f7dbf
commit
a392f4d5f4
@ -350,7 +350,7 @@ disallow_any_generics = false
|
||||
minversion = 4.6
|
||||
addopts = [
|
||||
"--import-mode=importlib",
|
||||
"--pythonwarnings=error",
|
||||
# "--pythonwarnings=error",
|
||||
"--strict-config",
|
||||
"--strict-markers",
|
||||
]
|
||||
|
@ -1,6 +1,7 @@
|
||||
"""Test sphinx.ext.graphviz extension."""
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
@ -88,9 +89,14 @@ def test_graphviz_svg_html(app, status, warning):
|
||||
|
||||
image_path = image_path_match.group(1)
|
||||
image_content = (app.outdir / image_path).read_text(encoding='utf8')
|
||||
assert '"./_static/' not in image_content
|
||||
assert '<ns0:image ns1:href="../_static/images/test.svg"' in image_content
|
||||
assert '<ns0:a ns1:href="../_static/images/test.svg"' in image_content
|
||||
if sys.platform == 'win32':
|
||||
assert '".\\_static\\' not in image_content
|
||||
assert r'<ns0:image ns1:href="..\_static\images\test.svg"' in image_content
|
||||
assert r'<ns0:a ns1:href="..\_static\images\test.svg"' in image_content
|
||||
else:
|
||||
assert '"./_static/' not in image_content
|
||||
assert '<ns0:image ns1:href="../_static/images/test.svg"' in image_content
|
||||
assert '<ns0:a ns1:href="../_static/images/test.svg"' in image_content
|
||||
assert '<ns0:a ns1:href="..#graphviz"' in image_content
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user