From 9e86496e48d800e6c07ec5952c66ffac32bfac45 Mon Sep 17 00:00:00 2001 From: Hans Fangohr <hans.fangohr@mpsd.mpg.de> Date: Fri, 9 Jun 2023 14:36:03 +0200 Subject: [PATCH] add test for get_available_toolchains --- tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests.py b/tests.py index 685ce13..b2a4edd 100644 --- a/tests.py +++ b/tests.py @@ -341,7 +341,6 @@ def test_install_environment_zlib(): ) assert len(build_log) == 4 - def test_metadata_logging(tmp_path): """Test that metadata is logged and read correctly.""" # Test that the metadata is logged correctly @@ -381,6 +380,12 @@ def test_metadata_logging(tmp_path): assert len(read_dict) == len(keys) +def test_get_available_toolchains(): + toolchains = mod.get_available_toolchains('dev-23a') + assert sorted(toolchains) == sorted(['foss2021a-cuda-mpi', 'foss2021a-mpi', + 'foss2021a-serial', 'foss2022a-cuda-mpi', 'foss2022a-mpi', + 'foss2022a-serial', 'global', 'global_generic']) + def test_create_log_file_names(): """Test that the log file names are created correctly.""" create_log_file_names = mod.create_log_file_names -- GitLab