@@ -969,9 +969,11 @@ def test_generate_files(operator_setup, model):
969969 yaml_i ["spec" ]["additional_data" ]["data" ] = df_add
970970 operator_config = ForecastOperatorConfig .from_dict (yaml_i )
971971 results = operate (operator_config )
972- files = os .listdir (operator_setup )
972+ files = os .listdir (yaml_i [ "spec" ][ "output_directory" ][ "url" ] )
973973 if "errors.json" in files :
974- with open (os .path .join (operator_setup , "errors.json" )) as f :
974+ with open (
975+ os .path .join (yaml_i ["spec" ]["output_directory" ]["url" ], "errors.json" )
976+ ) as f :
975977 assert False , f"Failed due to errors.json being created: { f .read ()} "
976978 assert "report.html" in files , "Failed to generate report"
977979 assert (
@@ -996,9 +998,11 @@ def test_generate_files(operator_setup, model):
996998 yaml_i ["spec" ].pop ("generate_metrics_file" )
997999 operator_config = ForecastOperatorConfig .from_dict (yaml_i )
9981000 results = operate (operator_config )
999- files = os .listdir (operator_setup )
1001+ files = os .listdir (yaml_i [ "spec" ][ "output_directory" ][ "url" ] )
10001002 if "errors.json" in files :
1001- with open (os .path .join (operator_setup , "errors.json" )) as f :
1003+ with open (
1004+ os .path .join (yaml_i ["spec" ]["output_directory" ]["url" ], "errors.json" )
1005+ ) as f :
10021006 print (f"Errors in build! { f .read ()} " )
10031007 assert False , "Failed due to errors.json being created"
10041008 assert "report.html" in files , "Failed to generate report"
0 commit comments