Skip to content

Commit a259b8d

Browse files
committed
fix(core): match documented ValueError in as_bytes driver test
The as_bytes() method raises ValueError for unsupported backends (per its docstring and matching the test directly above this one). The driver-backend skip-guarded test was asserting RuntimeError, so it always failed on CTK 12.9.1 runners where the skip condition does not apply.
1 parent 3199107 commit a259b8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cuda_core/tests/test_linker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def test_linker_options_as_bytes_invalid_backend():
225225
def test_linker_options_as_bytes_driver_not_supported():
226226
"""Test that as_bytes() is not supported for driver backend"""
227227
options = LinkerOptions(arch="sm_80")
228-
with pytest.raises(RuntimeError, match="as_bytes\\(\\) only supports 'nvjitlink' backend"):
228+
with pytest.raises(ValueError, match="as_bytes\\(\\) only supports 'nvjitlink' backend"):
229229
options.as_bytes("driver")
230230

231231

0 commit comments

Comments
 (0)