From 77c51adfc3754433d8b89331cfb76cdc608d83c3 Mon Sep 17 00:00:00 2001
From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de>
Date: Fri, 23 Jun 2023 11:27:23 +0200
Subject: [PATCH] update tests

---
 tests/test_mpsd_software.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/test_mpsd_software.py b/tests/test_mpsd_software.py
index a65d5d8..fb3bc75 100644
--- a/tests/test_mpsd_software.py
+++ b/tests/test_mpsd_software.py
@@ -509,7 +509,6 @@ def test_environment_status(tmp_path):
         assert set(toolchain_map[microarch]) == set(expected_toolchain_map[microarch])
 
 
-@pytest.mark.skip(reason="not implemented yet")
 def test_remove_environment(tmp_path):
     """Test that the remove_environment works as expected."""
     mpsd_release = "dev-23a"
@@ -521,15 +520,18 @@ def test_remove_environment(tmp_path):
 
     # test removal  without arguments (should sys.exit(1))
     create_fake_environment(tmp_path, mpsd_release)
-    with pytest.raises(SystemExit):
+    with pytest.raises(SystemExit) as pytest_wrapped_e:
         mod.remove_environment(mpsd_release, tmp_path, force_remove=True)
+    assert pytest_wrapped_e.type == SystemExit
+    assert pytest_wrapped_e.value.code == 1
 
     # test removal of the complete environment
+    create_fake_environment(tmp_path, mpsd_release)
     mod.remove_environment(mpsd_release, tmp_path, ["ALL"], force_remove=True)
     toolchain_map = mod.environment_status(mpsd_release, tmp_path)
     assert toolchain_map is None
     # ensure that logs folder remains
-    logs_folder = tmp_path / mpsd_release / "logs"
+    logs_folder = tmp_path / mpsd_release / mod.get_native_microarchitecture() / "logs"
     assert logs_folder.exists()
 
     # test removal of a single toolchain
-- 
GitLab