Skip to content

Commit

Permalink
increase timeout for cell execution in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
arogozhnikov committed Apr 28, 2024
1 parent 2b8ffec commit 8ae3852
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ def render_notebook(filename: Path, replacements: Dict[str, str]) -> str:
with filename.open("r") as f:
nb_as_str = f.read()
for original, replacement in replacements.items():
assert original in nb_as_str, f"not found in notebook: {original}"
nb_as_str = nb_as_str.replace(original, replacement)

nb = nbformat.read(StringIO(nb_as_str), nbformat.NO_CONVERT)
ep = ExecutePreprocessor(timeout=60, kernel_name="python3")
ep = ExecutePreprocessor(timeout=120, kernel_name="python3")
ep.preprocess(nb, {"metadata": {"path": str(filename.parent.absolute())}})

result_as_stream = StringIO()
Expand Down

0 comments on commit 8ae3852

Please sign in to comment.