From 0c7d7ba3b6b05d14cade2b76525a525e559f7fcc Mon Sep 17 00:00:00 2001 From: Alex Rudy Date: Mon, 13 May 2019 16:16:13 -0700 Subject: [PATCH] Use nbformat to set up notebook cells --- nbconvert/preprocessors/tests/test_execute.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/nbconvert/preprocessors/tests/test_execute.py b/nbconvert/preprocessors/tests/test_execute.py index c9aa20b4f..0229aa52e 100644 --- a/nbconvert/preprocessors/tests/test_execute.py +++ b/nbconvert/preprocessors/tests/test_execute.py @@ -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