File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ def __call__(self, func):
6060 def wrapper (* args , ** kwargs ): # pragma: no cover
6161 with self .client .setup_kernel ():
6262 self ._prepare ()
63- func (self .client , * args , ** kwargs )
63+ return func (self .client , * args , ** kwargs )
6464
6565 wrapper .patchings = [self ]
6666 return wrapper
Original file line number Diff line number Diff line change @@ -68,3 +68,11 @@ def test_testbook_with_notebook_node():
6868
6969 with testbook (nb ) as tb :
7070 assert tb .code_cells_executed == 0
71+
72+
73+ def test_function_with_testbook_decorator_returns_value ():
74+ @testbook ('testbook/tests/resources/inject.ipynb' )
75+ def test_function (tb ):
76+ return "This should be returned"
77+
78+ assert test_function () == "This should be returned"
You can’t perform that action at this time.
0 commit comments