Commit ff4837f4 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

python: more robust handling of %timeit in notebooks

* python/tests/ipnbdoctest.py: Simply ignore %timeit blocks.
parent 6fb4df43
......@@ -70,9 +70,6 @@ def sanitize(s):
# normalize graphviz version
s = re.sub(r'Generated by graphviz version.*', 'VERSION', s)
# ignore %timeit results
s = re.sub(r'^[0-9]+ loops, best of 3:.*per loop', '', 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.
......@@ -214,7 +211,7 @@ def test_notebook(nb):
errors = 0
for ws in nb.worksheets:
for i, cell in enumerate(ws.cells):
if cell.cell_type != 'code':
if cell.cell_type != 'code' or cell.input.startswith('%timeit'):
continue
try:
outs = run_cell(kc, cell)
......
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