Skip to content

Commit d62c4c0

Browse files
committed
Fix the build floor test
1 parent 0dfed54 commit d62c4c0

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎cuda_core/tests/test_build_hooks.py‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,17 @@ def _write_cuda_h(tmp_path, cuda_version):
653653
return str(tmp_path)
654654

655655

656+
def _mismatched_headers():
657+
"""CUDA_VERSION values one minor below and one minor above the floor of each
658+
major. Derived from the floors so that bumping one does not make a case
659+
match."""
660+
headers = []
661+
for floor in build_hooks._bindings_floors().values():
662+
for minor in (floor[1] - 1, floor[1] + 1):
663+
headers.append(floor[0] * 1000 + minor * 10)
664+
return sorted(headers)
665+
666+
656667
class TestBuildConfigurationCheck:
657668
"""_check_build_configuration() accepts exactly one configuration per CUDA
658669
major: cuda-bindings at or above the floor, and a cuda.h of the same
@@ -690,7 +701,7 @@ def test_bindings_of_another_major_fail(self, tmp_path, monkeypatch):
690701
build_hooks._check_build_configuration(cuda_path, "12")
691702

692703
@pytest.mark.agent_authored(model="claude-fable-5-1")
693-
@pytest.mark.parametrize("header", [13030, 13050, 12090])
704+
@pytest.mark.parametrize("header", _mismatched_headers())
694705
def test_header_minor_must_match_bindings(self, tmp_path, monkeypatch, header):
695706
floor = self.FLOOR[13]
696707
_fake_bindings(monkeypatch, _floor_str(13))

0 commit comments

Comments
 (0)