@@ -50,6 +50,46 @@ def test_missing_files():
5050 assert type (additional_files ) is list
5151
5252
53+ def test_load ():
54+ for geode_object , value in geode_objects .geode_objects_dict ().items ():
55+ print (f"{ geode_object = } " )
56+ input_extensions = geode_functions .geode_object_input_extensions (geode_object )
57+ missing_files = geode_functions .missing_files (
58+ geode_object , f"tests/data/test.{ input_extension } "
59+ )
60+ has_missing_files = missing_files .has_missing_files ()
61+ if has_missing_files :
62+ mandatory_files = geode_functions .mandatory_files (missing_files )
63+ print (f"{ mandatory_files = } " )
64+ additional_files = geode_functions .additional_files (missing_files )
65+ print (f"{ additional_files = } " )
66+ file_apsolute_path = os .path .abspath (f"tests/data/test.{ input_extension } " )
67+
68+ data = geode_functions .load (geode_object , file_apsolute_path )
69+ output_extensions = geode_functions .get_geode_object_output_extensions (
70+ geode_object
71+ )
72+
73+ for output_extension in output_extensions :
74+ print (f"{ output_extension = } " )
75+ uu_id = str (uuid .uuid4 ()).replace ("-" , "" )
76+ geode_functions .save (
77+ geode_object ,
78+ data ,
79+ os .path .abspath (f"output" ),
80+ f"{ uu_id } .{ output_extension } " ,
81+ )
82+
83+ if "save_viewable" in value :
84+ uu_id = str (uuid .uuid4 ()).replace ("-" , "" )
85+ geode_functions .save_viewable (
86+ geode_object ,
87+ data ,
88+ os .path .abspath (f"output" ),
89+ uu_id ,
90+ )
91+
92+
5393def test_is_model ():
5494 for geode_object , value in geode_objects .geode_objects_dict ().items ():
5595 is_model = geode_functions .is_model (geode_object )
0 commit comments