Skip to content

Commit 6ec081c

Browse files
committed
Add a public pathfinder driver info regression test.
Protect the new top-level driver-info re-exports so internal-only test coverage does not miss a broken `cuda.pathfinder` plumbing layer. Made-with: Cursor
1 parent 772451b commit 6ec081c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cuda_pathfinder/tests/test_utils_driver_info.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55

66
import pytest
77

8+
from cuda.pathfinder import (
9+
DriverCudaVersion as PublicDriverCudaVersion,
10+
)
11+
from cuda.pathfinder import (
12+
QueryDriverCudaVersionError as PublicQueryDriverCudaVersionError,
13+
)
14+
from cuda.pathfinder import (
15+
query_driver_cuda_version as public_query_driver_cuda_version,
16+
)
817
from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL
918
from cuda.pathfinder._utils import driver_info
1019

@@ -42,6 +51,12 @@ def _loaded_cuda(abs_path: str) -> LoadedDL:
4251
)
4352

4453

54+
def test_driver_cuda_version_public_api_exports():
55+
assert PublicDriverCudaVersion is driver_info.DriverCudaVersion
56+
assert PublicQueryDriverCudaVersionError is driver_info.QueryDriverCudaVersionError
57+
assert public_query_driver_cuda_version is driver_info.query_driver_cuda_version
58+
59+
4560
def test_query_driver_cuda_version_uses_windll_on_windows(monkeypatch):
4661
fake_driver_lib = _FakeDriverLib(status=0, version=12080)
4762
loaded_paths: list[str] = []

0 commit comments

Comments
 (0)