Commit 1fd0aa14 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

multiple adjustments for Debian stable

* tests/python/ipnbdoctest.py: Adjust to Python <3.6.
* tests/python/_autparserr.ipynb: Adjust to older IPython version.
* tests/python/stutter-inv.ipynb: Avoid pandas because its output
varies from version to version.
parent 527c8025
%% Cell type:code id: tags:
``` python
from IPython.display import display
import spot
spot.setup()
```
%% Cell type:markdown id: tags:
......@@ -67,11 +68,11 @@
```
%%%% Output: execute_result
![](data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN""http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><!-- Generated by graphviz version 2.38.0 (20140413.2041)--><!-- Title: G Pages: 1 --><svg width="133pt" height="101pt"viewBox="0.00 0.00 133.00 101.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 97)"><title>G</title><polygon fill="white" stroke="none" points="-4,4 -4,-97 129,-97 129,4 -4,4"/><!-- I --><!-- 1 --><g id="node2" class="node"><title>1</title><ellipse fill="#ffffaa" stroke="black" cx="107" cy="-42" rx="18" ry="18"/><text text-anchor="middle" x="107" y="-38.3" font-family="Lato" font-size="14.00">1</text></g><!-- I&#45;&gt;1 --><g id="edge1" class="edge"><title>I&#45;&gt;1</title><path fill="none" stroke="black" d="M23.0602,-62.9848C24.6706,-62.5773 58.2688,-54.0766 82.2014,-48.0213"/><polygon fill="black" stroke="black" points="89.2724,-46.2323 83.2589,-51.0031 85.8793,-47.0908 82.4862,-47.9493 82.4862,-47.9493 82.4862,-47.9493 85.8793,-47.0908 81.7135,-44.8956 89.2724,-46.2323 89.2724,-46.2323"/></g><!-- 1&#45;&gt;1 --><g id="edge3" class="edge"><title>1&#45;&gt;1</title><path fill="none" stroke="black" d="M99.9688,-58.6641C98.4062,-68.625 100.75,-78 107,-78 111.688,-78 114.178,-72.7266 114.471,-65.8876"/><polygon fill="black" stroke="black" points="114.031,-58.6641 117.601,-65.4598 114.244,-62.1576 114.456,-65.6511 114.456,-65.6511 114.456,-65.6511 114.244,-62.1576 111.312,-65.8425 114.031,-58.6641 114.031,-58.6641"/><text text-anchor="middle" x="107" y="-81.8" font-family="Lato" font-size="14.00">1</text></g><!-- 0 --><g id="node3" class="node"><title>0</title><ellipse fill="#ffffaa" stroke="black" cx="22" cy="-22" rx="18" ry="18"/><ellipse fill="none" stroke="black" cx="22" cy="-22" rx="22" ry="22"/><text text-anchor="middle" x="22" y="-18.3" font-family="Lato" font-size="14.00">0</text></g><!-- 0&#45;&gt;1 --><g id="edge2" class="edge"><title>0&#45;&gt;1</title><path fill="none" stroke="black" d="M43.5169,-26.9438C55.3149,-29.7867 70.1833,-33.3695 82.4561,-36.3268"/><polygon fill="black" stroke="black" points="89.3394,-37.9854 81.7962,-39.4079 85.9368,-37.1655 82.5342,-36.3455 82.5342,-36.3455 82.5342,-36.3455 85.9368,-37.1655 83.2721,-33.2832 89.3394,-37.9854 89.3394,-37.9854"/><text text-anchor="middle" x="66.5" y="-37.8" font-family="Lato" font-size="14.00">1</text></g></g></svg>)
<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fbec846c5a0> >
<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f72fc2ce090> >
%% Cell type:markdown id: tags:
# Error reading from pipe
......
......@@ -115,12 +115,9 @@ def canonicalize(s, type, ignores):
s = re.sub(r' fill="black"', '', s)
s = re.sub(r' stroke="transparent"', ' stroke="none"', s)
s = re.sub(r'><title>', '>\n<title>', s)
# Different Pandas versions produce different CSS styles.
s = re.sub(r'<style[ a-z]*>.*</style>',
'<style>...</style>', s, flags=re.DOTALL)
# CalledProcessError message has a final dot in Python 3.6
s = re.sub(r"(' returned non-zero exit status \d+)\.", r'\1', s)
# Different Pandas versions produce different CSS styles (when there is a
# style).
s = re.sub(r'<style[ a-z]*>.*</style>\n', '', s, flags=re.DOTALL)
for n, p in enumerate(ignores):
s = re.sub(p, 'IGN{}'.format(n), s)
......@@ -145,6 +142,12 @@ def canonical_dict(dict, ignores):
# sys.exit(77) is used to Skip the test.
sys.exit(77)
if 'ename' in dict and dict['ename'] == 'CalledProcessError':
# CalledProcessError message has a final dot in Python 3.6
dict['evalue'] = \
re.sub(r"(' returned non-zero exit status \d+)\.", r'\1',
dict['evalue'])
if 'transient' in dict:
del dict['transient']
if 'execution_count' in dict:
......
This diff is collapsed.
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