test_aide.functions.test_function_arguments¶
- test_aide.functions.test_function_arguments(func, expected_arguments, expected_default_values=None)[source]¶
Test that a given function has expected arguments and default values.
Uses inspect.getfullargspec to get the function argument information. Then loops through argument names and default values and uses assert_equal_msg to check actuals are equal to expected.
- Parameters
func (method) – Function to check.
expected_arguments (list) – List of names of expected argument, in order.
expected_default_values (tuple or None) – A tuple of lenght n of default argument values for the last n positional arguments, or None if there are no default values.