Skip to content

Commit 7aa61f6

Browse files
committed
Fix signature tests for non dunder methods on the array object
1 parent fb0a474 commit 7aa61f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_tests/test_signatures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def test_function_positional_args(name):
206206
mod_func = getattr(_mod, name)
207207
argspec = inspect.getfullargspec(stub_func)
208208
func_args = argspec.args
209-
if name.startswith('__'):
209+
if func_args[:1] == ['self']:
210210
func_args = func_args[1:]
211211
nargs = [len(func_args)]
212212
if argspec.defaults:
@@ -259,7 +259,7 @@ def test_function_keyword_only_args(name):
259259
mod_func = getattr(_mod, name)
260260
argspec = inspect.getfullargspec(stub_func)
261261
args = argspec.args
262-
if name.startswith('__'):
262+
if args[:1] == ['self']:
263263
args = args[1:]
264264
kwonlyargs = argspec.kwonlyargs
265265
kwonlydefaults = argspec.kwonlydefaults or {}

0 commit comments

Comments
 (0)