Commit 127b77fb authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

python: be more robust to different graphviz version in tests

* wrap/python/tests/ipnbdoctest.py: Ignore anything that look like an
SVG coordinate to compare outputs.
parent 1ffdd573
......@@ -67,6 +67,13 @@ def sanitize(s):
# normalize UUIDs:
s = re.sub(r'[a-f0-9]{8}(\-[a-f0-9]{4}){3}\-[a-f0-9]{12}', 'U-U-I-D', s)
# SVG generated by graphviz may put note at different positions
# depending on the graphviz build. Let's just strip anything that
# look like a position.
s = re.sub(r'<path d="[^"]*"', '<path', s)
s = re.sub(r'x="[0-9.]+"', 'x=""', s)
s = re.sub(r'y="[0-9.]+"', 'y=""', s)
return s
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment