Skip to content

Commit

Permalink
remove unrelevent tests for EESSI
Browse files Browse the repository at this point in the history
  • Loading branch information
vsc46128 vscuser committed Mar 12, 2024
1 parent 3f7d84a commit cd824c9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
20 changes: 0 additions & 20 deletions scripts/available_software/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions scripts/available_software/tests/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cd824c9

Please sign in to comment.