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

Commit 0d5a24d

Browse files
jisantucChris Brown
authored and
Chris Brown
committed
Add *args and **kwargs to no_op function in notebook support check
1 parent 2b648ac commit 0d5a24d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Diff for: rasterfoundry/decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def check_notebook(f):
7-
def no_op():
7+
def no_op(*args, **kwargs):
88
logging.warn('This function requires jupyter notebook and ipyleaflet')
99
return
1010

Diff for: tests/test_notebook_check.py

+11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ def f():
99
assert f() is None
1010

1111

12+
def test_warn_without_notebook_support_with_args():
13+
import rasterfoundry.decorators
14+
rasterfoundry.decorators.NOTEBOOK_SUPPORT = False
15+
from rasterfoundry.decorators import check_notebook
16+
17+
@check_notebook
18+
def f(*args, **kwargs):
19+
return 'foo'
20+
assert f(1, 2, 3, foo='bar') is None
21+
22+
1223
def test_no_warn_with_notebook_support():
1324
import rasterfoundry.decorators
1425
rasterfoundry.decorators.NOTEBOOK_SUPPORT = True

0 commit comments

Comments
 (0)