Skip to content

Commit 3a18bb0

Browse files
notebook test: prevent \?.* lines from being executed
1 parent ddfb486 commit 3a18bb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/jenkins/test_notebooks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,14 @@ def test_notebook(nb, name):
9292
re.sub(r"pool=\w+", "pool=None", ln)
9393
for ln in c["source"].split("\n")
9494
if not ln.startswith("%")
95+
and not ln.startswith("?")
96+
and not ln.strip().endswith("?")
9597
and not ln.startswith("help(")
9698
and not ln.startswith("ask_ok(")
9799
and not ln.startswith("ask_ok(")
98100
and not ln.startswith(
99101
"pool"
100102
) # by convention Pool objects are called pool
101-
and not ln.strip().endswith("?")
102103
and not re.search(
103104
r"(\W|^)Pool\(", ln
104105
) # prevent Pool object creation

0 commit comments

Comments
 (0)