From c472bd56f0929573cd1b8bb2f5e0646b641923e7 Mon Sep 17 00:00:00 2001 From: Tim Dettmers Date: Fri, 5 Aug 2022 08:57:52 -0700 Subject: Added the case that all env variables are empty (CUDA docker). --- tests/test_cuda_setup_evaluator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_cuda_setup_evaluator.py') diff --git a/tests/test_cuda_setup_evaluator.py b/tests/test_cuda_setup_evaluator.py index 3d34c29..c947ca1 100644 --- a/tests/test_cuda_setup_evaluator.py +++ b/tests/test_cuda_setup_evaluator.py @@ -133,7 +133,7 @@ def test_full_system(): ) version = float(f"{major}.{minor}") - if version == "" and "LD_LIBRARY_PATH": + if version == "" and "LD_LIBRARY_PATH" in os.environ: ld_path = os.environ["LD_LIBRARY_PATH"] paths = ld_path.split(":") version = "" @@ -144,6 +144,7 @@ def test_full_system(): version = float(version) break + assert version > 0 binary_name = evaluate_cuda_setup() binary_name = binary_name.replace("libbitsandbytes_cuda", "") -- cgit v1.2.3