From cd824c96d23d7bb4aed11b2c1c7a22e7b5286107 Mon Sep 17 00:00:00 2001 From: vsc46128 vscuser Date: Tue, 12 Mar 2024 17:50:38 +0100 Subject: [PATCH] remove unrelevent tests for EESSI --- scripts/available_software/README.md | 20 ------------------- .../available_software/tests/test_module.py | 5 ----- 2 files changed, 25 deletions(-) diff --git a/scripts/available_software/README.md b/scripts/available_software/README.md index b8c51051e..2cbfdfc65 100644 --- a/scripts/available_software/README.md +++ b/scripts/available_software/README.md @@ -60,26 +60,6 @@ If you want to write additional tests and use the script effectively, follow the os.environ["LMOD_CMD"] = cls.path + "/data/lmod_mock.sh" ``` -2. **Mocking output of `module avail cluster` command:** - - The output of the command `module avail cluster/` can be put in a `.txt` file. - Set the path to this file in the `$MOCK_FILE_AVAIL_CLUSTER` environment variable. - ```python - os.environ["MOCK_FILE_AVAIL_CLUSTER"] = path + "/data/data_avail_cluster_simple.txt" - ``` - -3. **Mocking the `module swap` command:** - - For mocking the `module swap` command, assign the path to the swap files to the `$MOCK_FILE_SWAP` environment variable. - Ensure that the filename contains the placeholder '`CLUSTER`', - which will later be replaced with the actual cluster name when performing the swap. - - ```python - os.environ["MOCK_FILE_SWAP"] = path + "/data/data_swap_CLUSTER.txt" - ``` - When trying to swap to, for example, the `cluster/pikachu` cluster, - it will use the `data_swap_pikachu.txt` file as output for the swap command. - ### Example An example of a possible `setup_class` function is given below. ```python diff --git a/scripts/available_software/tests/test_module.py b/scripts/available_software/tests/test_module.py index 08633a59c..c7368b18b 100644 --- a/scripts/available_software/tests/test_module.py +++ b/scripts/available_software/tests/test_module.py @@ -32,11 +32,6 @@ def test_avail_filtered(self): "science/5.3.0", "science/5.3.0", "science/5.3.0", "science/7.2.0" ] - def test_avail_cluster(self): - os.environ["MOCK_FILE_AVAIL_CLUSTER"] = self.path + "/data/data_avail_cluster_simple.txt" - output = module_avail(name="cluster/") - assert len(output) == 1 - def test_whatis(self): os.environ["MOCK_FILE_SHOW"] = self.path + "/data/data_show_science.txt" data = module_whatis("science")