Skip to content

Commit

Permalink
Use nbformat to set up notebook cells
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudy committed May 13, 2019
1 parent 7b4a677 commit 0c7d7ba
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions nbconvert/preprocessors/tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,7 @@ def label_parallel_notebook(nb, label):
Used for parallel testing to label two notebooks which are run simultaneously.
"""
label_cell = nbformat.NotebookNode(
{
"cell_type": "code",
"execution_count": None,
"metadata": {},
"outputs": [],
"source": "this_notebook = '{}'".format(label),
}
)

label_cell = nbformat.v4.new_code_cell(source="this_notebook = '{}'".format(label))
nb.cells.insert(1, label_cell)
return nb

Expand Down

0 comments on commit 0c7d7ba

Please sign in to comment.