You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better signature tests for required arguments #281
This signature tests do not properly check for cases where a function has more required positional arguments than it should. Such a case should be considered noncompliant, since user code written against the standard signature would not function. For example, if the standard has a function
deff(x, y=None):
...
then a function
deff(x, y):
...
should fail the signature test, because code like f(a) should work according to the standard but it wouldn't in the implementation.
The former works if you pass min and max as keywords but not if you pass them positionally (array-api-compat has a decorator that automatically injects the xp keyword argument into the final signature).
Additionally, some helpers to test optional positional arguments as both positional and keyword in the test itself would be useful. Right now we have specified_kwargs() but it doesn't allow passing the arguments as positional.
Activity