MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / test_override

Function test_override

tests/test_cuda_setup_evaluator.py:108–115  ·  view source on GitHub ↗

BNB_CUDA_VERSION overrides path selection.

(monkeypatch, cuda120_spec, caplog)

Source from the content-addressed store, hash-verified

106
107
108def test_override(monkeypatch, cuda120_spec, caplog):
109 """BNB_CUDA_VERSION overrides path selection."""
110 monkeypatch.setenv("BNB_CUDA_VERSION", "110")
111 with patch("bitsandbytes.cextension._find_cuda_libs", return_value={}):
112 with caplog.at_level("WARNING"):
113 result = get_cuda_bnb_library_path(cuda120_spec)
114 assert result.stem == "libbitsandbytes_cuda110"
115 assert "BNB_CUDA_VERSION" in caplog.text
116
117
118def test_rocm_override(monkeypatch, rocm70_spec, caplog):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected