I\'m looking for a way to check the number of arguments that a given function takes in Python. The purpose is to achieve a more robust method of patching my classes for tests.
inspect.getargspec is deprecated in Python 3. Consider something like:
inspect.getargspec
import inspect len(inspect.signature(foo_func).parameters)