We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a739cfe commit 08b7e29Copy full SHA for 08b7e29
1 file changed
src/array_api_extra/testing.py
@@ -237,6 +237,8 @@ def test_myfunc(xp):
237
# to ensure that this is preserved.
238
raw_attr = getattr_static(cls, method_name)
239
method = getattr(cls, method_name)
240
+ if isinstance(raw_attr, classmethod):
241
+ method = method.__func__
242
cloned_method = _clone_function(method)
243
244
method_to_set: Any
@@ -249,6 +251,8 @@ def test_myfunc(xp):
249
251
250
252
setattr(cls, method_name, method_to_set)
253
f = getattr(cls, method_name)
254
255
+ f = f.__func__
256
# Annotate that cls owns this method so we can check that later.
257
tags["owner"] = cls
258
else:
0 commit comments