Skip to content

Commit ad2eba7

Browse files
authored
Rename executenb() -> execute() (#15)
Rename executenb() -> execute()
1 parent 8afbb65 commit ad2eba7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nbclient/execute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ def _get_buffer_data(self, msg):
698698
return encoded_buffers
699699

700700

701-
def executenb(nb, cwd=None, km=None, **kwargs):
701+
def execute(nb, cwd=None, km=None, **kwargs):
702702
"""Execute a notebook's code, updating outputs within the notebook object.
703703
704704
This is a convenient wrapper around Executor. It returns the

nbclient/tests/test_execute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import xmltodict
1313

1414
from .base import ExecutorTestsBase
15-
from ..execute import Executor, executenb
15+
from ..execute import Executor, execute
1616
from ..exceptions import CellExecutionError
1717

1818
import IPython
@@ -465,14 +465,14 @@ def process_message(self, msg, cell, cell_index):
465465
assert_notebooks_equal(original, executed)
466466

467467
def test_execute_function(self):
468-
# Test the executenb() convenience API
468+
# Test the execute() convenience API
469469
filename = os.path.join(current_dir, 'files', 'HelloWorld.ipynb')
470470

471471
with io.open(filename) as f:
472472
input_nb = nbformat.read(f, 4)
473473

474474
original = copy.deepcopy(input_nb)
475-
executed = executenb(original, os.path.dirname(filename))
475+
executed = execute(original, os.path.dirname(filename))
476476
assert_notebooks_equal(original, executed)
477477

478478
def test_widgets(self):

0 commit comments

Comments
 (0)