-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
get_param_names
helper function.
- Loading branch information
1 parent
fbcd573
commit a05738f
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""This module contains tests for the helper module. | ||
""" | ||
|
||
from pywrangler.util.helper import get_param_names | ||
|
||
|
||
def test_get_param_names(): | ||
|
||
def func(): | ||
pass | ||
|
||
assert get_param_names(func) == [] | ||
|
||
def func1(a, b=4, c=6): | ||
pass | ||
|
||
assert get_param_names(func1) == ["a", "b", "c"] | ||
assert get_param_names(func1, ["a"]) == ["b", "c"] |