diff --git a/tests.py b/tests.py
index 3c545f5e19cdb09b0c3508fef05f42f06ddab24c..0f9392dccda960189dd9fac1bf01b77f53e18c56 100644
--- a/tests.py
+++ b/tests.py
@@ -80,3 +80,12 @@ def test_setup_log_cmd(tmp_path):
     # check that logs/install-software-environment.log is updated
     assert os.path.exists("logs/install-software-environment.log")
     assert os.path.getsize("logs/install-software-environment.log") > initial_bytes
+
+def test_install_environment(tmp_path):
+    # Expect and Exception when wrong toolchains are provided
+    with pytest.raises(Exception):
+        mod.install_environment(
+            mpsd_release="dev-23a",
+            toolchains=["wrong-toolchain"],
+            script_dir=(tmp_path),
+        )
\ No newline at end of file