|
6 | 6 | from pathlib import Path |
7 | 7 |
|
8 | 8 | import pytest |
| 9 | +from local_helpers import ( |
| 10 | + locate_real_cuda_toolkit_version_from_cuda_h, |
| 11 | + require_real_cuda_toolkit_version_from_cuda_h, |
| 12 | + require_real_driver_cuda_version, |
| 13 | +) |
9 | 14 |
|
10 | 15 | import cuda.pathfinder._compatibility_guard_rails as compatibility_module |
11 | 16 | from cuda import pathfinder |
|
26 | 31 | from cuda.pathfinder._headers.find_nvidia_headers import ( |
27 | 32 | locate_nvidia_header_directory as locate_nvidia_header_directory_raw, |
28 | 33 | ) |
29 | | -from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home |
30 | 34 | from cuda.pathfinder._utils import driver_info |
31 | 35 | from cuda.pathfinder._utils.driver_info import DriverCudaVersion, QueryDriverCudaVersionError |
| 36 | +from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home |
32 | 37 | from cuda.pathfinder._utils.toolkit_info import read_cuda_header_version |
33 | | -from local_helpers import ( |
34 | | - locate_real_cuda_toolkit_version_from_cuda_h, |
35 | | - require_real_driver_cuda_version, |
36 | | - require_real_cuda_toolkit_version_from_cuda_h, |
37 | | -) |
38 | 38 |
|
39 | 39 | STRICTNESS = os.environ.get("CUDA_PATHFINDER_TEST_COMPATIBILITY_GUARD_RAILS_STRICTNESS", "see_what_works") |
40 | 40 | assert STRICTNESS in ("see_what_works", "all_must_work") |
@@ -693,8 +693,7 @@ def test_real_wheel_ctk_items_are_compatible(info_summary_append): |
693 | 693 | f"via {real_ctk.found_via} at {real_ctk.cuda_h_path!r}" |
694 | 694 | ) |
695 | 695 | info_summary_append( |
696 | | - "real driver CUDA version=" |
697 | | - f"{real_driver.major}.{real_driver.minor} (encoded={real_driver.encoded})" |
| 696 | + f"real driver CUDA version={real_driver.major}.{real_driver.minor} (encoded={real_driver.encoded})" |
698 | 697 | ) |
699 | 698 | guard_rails = CompatibilityGuardRails( |
700 | 699 | ctk_major=real_ctk.version.major, |
@@ -742,8 +741,7 @@ def test_real_wheel_component_version_does_not_override_ctk_line(info_summary_ap |
742 | 741 | f"via {real_ctk.found_via} at {real_ctk.cuda_h_path!r}" |
743 | 742 | ) |
744 | 743 | info_summary_append( |
745 | | - "real driver CUDA version=" |
746 | | - f"{real_driver.major}.{real_driver.minor} (encoded={real_driver.encoded})" |
| 744 | + f"real driver CUDA version={real_driver.major}.{real_driver.minor} (encoded={real_driver.encoded})" |
747 | 745 | ) |
748 | 746 | guard_rails = CompatibilityGuardRails( |
749 | 747 | ctk_major=real_ctk.version.major, |
|
0 commit comments