@@ -183,25 +183,38 @@ def scale_by_val(x):
183183 s .build (series_funs )
184184
185185 g_series = glob .glob (os .path .join (self .scenarios_dir , '*' ))
186- assert len (g_series ) == 3 , g_series
186+
187+ # this should be 5 because of series_metadata.json and inputs_dir
188+ assert len (g_series ) == 5 , g_series
187189
188190 uuid_pattern = re .compile (
189191 r'^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$'
190192 )
191- dircount = 0
193+
194+ uuid_dir_count = 0
195+ non_uuid_dir_count = 0
192196 series_dirs = []
197+ found_metadata = False
193198 for d in g_series :
194199 # XXX TODO this is in flux. at this point maybe all will be dirs
195200 if os .path .isdir (d ):
196201 # at this point the files are in the base scenario dir;
197202 # they will be moved later when the scenario is run
198203 assert_valid_input_dir (self , os .path .join (d ))
199- assert re .match (uuid_pattern , os .path .basename (d )), os .path .basename (d )
204+ if re .match (uuid_pattern , os .path .basename (d )):
205+ uuid_dir_count += 1
206+ assert re .match (uuid_pattern , os .path .basename (d )), os .path .basename (d )
207+ else :
208+ non_uuid_dir_count += 1
209+
210+ else :
211+ found_metadata = True
200212
201213 series_dirs .append (d )
202- dircount += 1
203214
204- assert dircount == 3
215+ assert uuid_dir_count == 3
216+ assert non_uuid_dir_count == 1
217+ assert found_metadata
205218
206219 s .run ()
207220
@@ -229,7 +242,7 @@ def scale_by_val(x):
229242 os .path .join (self .test_model_data_dir , 'parameters' )
230243 )
231244 for g in g_series :
232- if os .path .isdir (g ):
245+ if os .path .isdir (g ) and 'input' not in g :
233246 assert_valid_output_dir (self , os .path .join (g , 'outputs' ))
234247
235248 md = json .loads (open (os .path .join (g , 'metadata.json' )).read ())
0 commit comments