diff --git a/tests/test_mpsd_software.py b/tests/test_mpsd_software.py
index c7bc12cdeb647aa41ba0113aa33a92d2ca2b32c6..1d2a26ef5f68f4161a76d5986b98c688f63f34c0 100644
--- a/tests/test_mpsd_software.py
+++ b/tests/test_mpsd_software.py
@@ -542,11 +542,11 @@ def test_initialize_environment(tmp_path):
 def test_get_root_dir(tmp_path):
     """Test that the root directory is correct."""
     with mod.os_chdir(tmp_path):
-        # test that  function exists with error 1 if root dir doesn't exist
+        # test that  function exists with error 40 if root dir doesn't exist
         with pytest.raises(SystemExit) as pytest_wrapped_e:
             mod.get_root_dir()
         assert pytest_wrapped_e.type == SystemExit
-        assert pytest_wrapped_e.value.code == 1
+        assert pytest_wrapped_e.value.code == 40
 
         # test that initialize_environment creates the root dir
         mod.initialize_environment(tmp_path)