From efe83d44935cf6aa0e96b6172f3cfbb1b9520969 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 27 Feb 2024 12:53:33 -0800 Subject: [PATCH] Restore working directory after test --- modules/spatiotemporal/test/test_make_graph.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/spatiotemporal/test/test_make_graph.py b/modules/spatiotemporal/test/test_make_graph.py index f35089cf26..3f6b16032f 100644 --- a/modules/spatiotemporal/test/test_make_graph.py +++ b/modules/spatiotemporal/test/test_make_graph.py @@ -44,6 +44,7 @@ def test_graph_setup(self): # keys correspond to all timepoints keys = list(state_dict.keys()) # Go to input_dir, if it exists + orig_dir = os.getcwd() if len(input_dir) > 0: if os.path.exists(input_dir): os.chdir(input_dir) @@ -73,6 +74,8 @@ def test_graph_setup(self): # check that all nodes are graphNode objects for node in nodes: self.assertIsInstance(node,graphNode.graphNode) + # Restore original working directory + os.chdir(orig_dir) def test_graph_scoring(self): """