@@ -969,9 +969,11 @@ def test_generate_files(operator_setup, model):
969
969
yaml_i ["spec" ]["additional_data" ]["data" ] = df_add
970
970
operator_config = ForecastOperatorConfig .from_dict (yaml_i )
971
971
results = operate (operator_config )
972
- files = os .listdir (operator_setup )
972
+ files = os .listdir (yaml_i [ "spec" ][ "output_directory" ][ "url" ] )
973
973
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 :
975
977
assert False , f"Failed due to errors.json being created: { f .read ()} "
976
978
assert "report.html" in files , "Failed to generate report"
977
979
assert (
@@ -996,9 +998,11 @@ def test_generate_files(operator_setup, model):
996
998
yaml_i ["spec" ].pop ("generate_metrics_file" )
997
999
operator_config = ForecastOperatorConfig .from_dict (yaml_i )
998
1000
results = operate (operator_config )
999
- files = os .listdir (operator_setup )
1001
+ files = os .listdir (yaml_i [ "spec" ][ "output_directory" ][ "url" ] )
1000
1002
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 :
1002
1006
print (f"Errors in build! { f .read ()} " )
1003
1007
assert False , "Failed due to errors.json being created"
1004
1008
assert "report.html" in files , "Failed to generate report"
0 commit comments