Skip to content

Commit 083cb7a

Browse files
cpcloudclaude
andcommitted
test(core): assert backend is classmethod not property
Explicit guard that the intentional property-to-classmethod break is preserved. Documents the breaking change in the test itself. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 689bed5 commit 083cb7a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cuda_core/tests/test_linker_backend.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,13 @@ def test_backend_idempotent(self, monkeypatch):
4747
monkeypatch.setattr(_linker, "_use_nvjitlink_backend", True)
4848
results = [Linker.backend() for _ in range(3)]
4949
assert results == ["nvJitLink", "nvJitLink", "nvJitLink"]
50+
51+
def test_backend_is_not_property(self):
52+
"""backend is a classmethod, not a property.
53+
54+
This is an intentional breaking change from the prior property API.
55+
Attribute-style access (``linker.backend``) now returns a bound method,
56+
not a string. All call sites must use parens: ``Linker.backend()``.
57+
"""
58+
attr = inspect.getattr_static(Linker, "backend")
59+
assert not isinstance(attr, property)

0 commit comments

Comments
 (0)