tests: update ipnbdoctest to graphviz 2.40 and Python 3.6
This fix recent failures observed on arch linux because it uses newer versions of graphviz and Python. * tests/python/ipnbdoctest.py (sanitize): More substitutions.
This commit is contained in:
parent
c090c4205f
commit
32086f7c83
1 changed files with 14 additions and 0 deletions
|
|
@ -94,6 +94,20 @@ def sanitize(s):
|
||||||
s = re.sub(r'transform="[^"]*"', 'transform=""', s)
|
s = re.sub(r'transform="[^"]*"', 'transform=""', s)
|
||||||
s = re.sub(r'id="edge[^"]*"', 'id="edge"', s)
|
s = re.sub(r'id="edge[^"]*"', 'id="edge"', s)
|
||||||
s = re.sub(r'text-anchor="[^"]*"', 'text-anchor=""', s)
|
s = re.sub(r'text-anchor="[^"]*"', 'text-anchor=""', s)
|
||||||
|
# The following patterns from graphviz 2.40 are rewritten as they used to
|
||||||
|
# be in 2.38.
|
||||||
|
s = re.sub(r'"#000000"', '"black"', s)
|
||||||
|
s = re.sub(r'"#ffffff"', '"white"', s)
|
||||||
|
s = re.sub(r'"#00ff00"', '"green"', s)
|
||||||
|
s = re.sub(r'"#ff0000"', '"red"', s)
|
||||||
|
s = re.sub(r'"#c0c0c0"', '"grey"', s)
|
||||||
|
s = re.sub(r'"#ffa500"', '"orange"', s)
|
||||||
|
s = re.sub(r' fill="black"', '', s)
|
||||||
|
s = re.sub(r' stroke="transparent"', ' stroke="none"', s)
|
||||||
|
s = re.sub(r'><title>', '>\n<title>', s)
|
||||||
|
|
||||||
|
# CalledProcessError message has a final dot in Python 3.6
|
||||||
|
s = re.sub(r"(' returned non-zero exit status \d+)\.", r'\1', s)
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue