From 062bb997da965adad43d02a18e86b51642453353 Mon Sep 17 00:00:00 2001 From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de> Date: Tue, 9 May 2023 14:34:23 +0200 Subject: [PATCH] update preare env with test --- tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests.py b/tests.py index fa66655..b6bd9d3 100644 --- a/tests.py +++ b/tests.py @@ -60,6 +60,12 @@ def test_prepare_environment(tmp_path): assert "global" in result assert "foss2021a-mpi" in result + # Expect an Exception when wrong mpsd_release is provided + with pytest.raises(Exception): + result = mod.prepare_environment( + mpsd_release="wrong-mpsd-release", script_dir=(script_dir) + ) + def test_setup_log_cmd(tmp_path): # check that logs/install-software-environment.log is updated when the module is run @@ -90,7 +96,7 @@ def test_install_environment(tmp_path): toolchains=["wrong-toolchain"], script_dir=(tmp_path), ) - # Expect an Exception when wrong mpsd_release is provided + # Expect an Exception when wrong mpsd_release is provided ( part of prepare_environment) with pytest.raises(Exception): mod.install_environment( mpsd_release="wrong-mpsd-release", -- GitLab