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.
This commit is contained in:
parent
1ffdd57383
commit
127b77fb25
1 changed files with 7 additions and 0 deletions
|
|
@ -67,6 +67,13 @@ def sanitize(s):
|
||||||
# normalize UUIDs:
|
# normalize UUIDs:
|
||||||
s = re.sub(r'[a-f0-9]{8}(\-[a-f0-9]{4}){3}\-[a-f0-9]{12}', 'U-U-I-D', s)
|
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
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue