From aa4e80339d642eca2915a1e1043821b09943183e Mon Sep 17 00:00:00 2001 From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de> Date: Fri, 16 Jun 2023 15:49:30 +0200 Subject: [PATCH] update broken test ( not part of migration) --- tests/test_mpsd_software.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_mpsd_software.py b/tests/test_mpsd_software.py index 6ef1d0d..7b4fd77 100644 --- a/tests/test_mpsd_software.py +++ b/tests/test_mpsd_software.py @@ -190,13 +190,16 @@ def test_record_script_execution_summary(tmp_path): def test_install_environment_wrong_package_set(tmp_path): """Test exception is raised for non-existing package_set.""" - # Expect an Exception when wrong package_sets are provided - with pytest.raises(Exception): + # exits with exit code 1 when wrong package_sets are provided + with pytest.raises(SystemExit) as e: mod.install_environment( mpsd_release="dev-23a", package_sets=["wrong-package_set"], root_dir=(tmp_path), ) + assert e.type == SystemExit + assert e.value.code == 1 + def test_install_environment_wrong_mpsd_release(tmp_path): -- GitLab