-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for function arguments #1303
Comments
I don't know that this is possible for functions that use the This may be easier in v6.0.0. Arguments and kwargs should be explicitly set, and the length can be obtained via the signature. See this SO post: https://stackoverflow.com/a/41188411 from inspect import signature
def someMethod(self, arg1, kwarg1=None):
pass
sig = signature(someMethod)
print(len(params)) # 3 |
The functions/methods using The target is in 6.0.0 we removed the We can put it as a target:
What do you think? |
I agree, we should not have def func(**kwargs):
... and we should have def func(kw_arg1=True, kw_arg2=False, ...) I would like to add a simple test that This is ultimately low priority. |
closed by #1296 |
Some functions are aliases of other functions. For example:
get_all_values
andget_values
get_all_records
andget_records
Over time, we may add kwargs and args to the original functions, and forget to add these to the aliases. We should add some simple tests to the test files that verify that the function arguments/kwargs are the same.
This issue alread arose once with
get
vsget_values
.The text was updated successfully, but these errors were encountered: