3838# Third party imports
3939
4040# Local application imports
41- from navigate .tools .file_functions import create_save_path , save_yaml_file , delete_folder , load_yaml_file
41+ from navigate .tools .file_functions import (
42+ create_save_path ,
43+ save_yaml_file ,
44+ delete_folder ,
45+ load_yaml_file ,
46+ )
4247
4348
4449class CreateSavePathTestCase (unittest .TestCase ):
@@ -59,6 +64,7 @@ def test_existing_root_directory_no_existing_cell_directories(self):
5964 "tissue" : "Liver" ,
6065 "celltype" : "Hepatocyte" ,
6166 "label" : "Sample1" ,
67+ "prefix" : "Cell_" ,
6268 }
6369 expected_save_directory = os .path .join (
6470 self .save_root ,
@@ -102,6 +108,7 @@ def test_existing_root_directory_existing_cell_directories(self):
102108 "tissue" : "Liver" ,
103109 "celltype" : "Hepatocyte" ,
104110 "label" : "Sample1" ,
111+ "prefix" : "Cell_" ,
105112 }
106113
107114 save_directory = create_save_path (saving_settings )
@@ -133,6 +140,7 @@ def test_spaces_in_strings(self):
133140 "tissue" : "Liver Tissue" ,
134141 "celltype" : "Hepatocyte Cell Type" ,
135142 "label" : "Sample 1" ,
143+ "prefix" : "Cell_" ,
136144 }
137145
138146 save_directory = create_save_path (saving_settings )
@@ -212,7 +220,6 @@ def test_delete_folder(self):
212220
213221
214222class TestLoadYamlFile (unittest .TestCase ):
215-
216223 def setUp (self ) -> None :
217224 os .mkdir ("test_dir" )
218225 self .save_root = "test_dir"
@@ -238,9 +245,11 @@ def test_load_nonexistent_yaml_file(self):
238245 def test_load_invalid_yaml_file (self ):
239246 file_path = os .path .join (self .save_root , "test.yml" )
240247 with open (file_path , "w" ) as f :
241- f .write ("""
242- {"name": "John Doe", "age": 30, "locati
243- """ )
248+ f .write (
249+ """
250+ {"name": "John Doe", "age": 30, "locati
251+ """
252+ )
244253 result = load_yaml_file (file_path )
245254 self .assertIsNone (result )
246255
0 commit comments