Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 918ad7d

Browse files
author
Calvin Leather
committed
added unit test to ensure deck doesn't break papermill local execution
1 parent fc48f64 commit 918ad7d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

plugins/flytekit-papermill/tests/test_task.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,17 @@ def test_notebook_task_complex():
6969
assert nb.python_interface.outputs.keys() == {"h", "w", "x", "out_nb", "out_rendered_nb"}
7070
assert nb.output_notebook_path == out == _get_nb_path(nb_name, suffix="-out")
7171
assert nb.rendered_output_path == render == _get_nb_path(nb_name, suffix="-out", ext=".html")
72+
73+
74+
def test_notebook_deck_local_execution_doesnt_fail():
75+
nb_name = "nb-simple"
76+
nb = NotebookTask(
77+
name="test",
78+
notebook_path=_get_nb_path(nb_name, abs=False),
79+
render_deck=True,
80+
inputs=kwtypes(pi=float),
81+
outputs=kwtypes(square=float),
82+
)
83+
sqr, out, render = nb.execute(pi=4)
84+
# This is largely a no assert test to ensure render_deck never inhibits local execution.
85+
assert nb._render_deck, "Passing render deck to init should result in private attribute being set"

0 commit comments

Comments
 (0)