From 1d60d19695a55973f99077b3238049b1d823bfe4 Mon Sep 17 00:00:00 2001
From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de>
Date: Tue, 27 Jun 2023 18:10:28 +0200
Subject: [PATCH] add another test

---
 tests/test_mpsd_software.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/test_mpsd_software.py b/tests/test_mpsd_software.py
index 91950f6..7a8e4c1 100644
--- a/tests/test_mpsd_software.py
+++ b/tests/test_mpsd_software.py
@@ -560,6 +560,12 @@ def test_get_root_dir(tmp_path):
             root_dir = mod.get_root_dir()
             assert root_dir == tmp_path
 
+        # test that initialising in a subdirectory makes it the root dir
+        with mod.os_chdir(sub_dir):
+            mod.initialize_environment(sub_dir)
+            root_dir = mod.get_root_dir()
+            assert root_dir == sub_dir
+
 
 def test_interface(tmp_path):
     """Test other things (not implemented yet)."""
-- 
GitLab