@@ -57,4 +57,39 @@ def test_excel_runner():
5757 save_dir = TEST_DATA_DIR / "design"
5858 )
5959 assert results ['C01' ]['successful_key' ] is None # No match found
60+ assert results ['C02' ]['successful_key' ] == "OptA" # Option A worked passed the criteria
61+
62+ results = xl .excel_runner (
63+ TEST_DATA_DIR / "example_wb.xlsx" ,
64+ static_inputs = {"static" : [10 , 20 ], "Labels" : ["C01" , "C02" ]},
65+ dynamic_inputs = {
66+ "OptA" : {"B2" : 22 },
67+ "OptB" : {"B2" : 33 },
68+ "OptC" : {"B2" : 55 },
69+ },
70+ success_conditions = {"B6" : dcr2 },
71+ static_identifier_keys = ["Labels" ],
72+ result_labels = {"B6" : "meaningful_value" },
73+ static_input_maps = {"static" : "B1" },
74+ save_dir = TEST_DATA_DIR / "design"
75+ )
76+ assert results ['C01' ]['successful_key' ] is None # No match found
77+ assert results ['C02' ]['successful_key' ] == "OptA" # Option A worked passed the criteria
78+
79+
80+ results = xl .excel_runner (
81+ TEST_DATA_DIR / "example_wb.xlsx" ,
82+ static_inputs = [{"static" : 10 , "Labels" : "C01" }, {"static" : 20 , "Labels" : "C02" }],
83+ dynamic_inputs = {
84+ "OptA" : {"B2" : 22 },
85+ "OptB" : {"B2" : 33 },
86+ "OptC" : {"B2" : 55 },
87+ },
88+ success_conditions = {"B6" : dcr2 },
89+ static_identifier_keys = ["Labels" ],
90+ result_labels = {"B6" : "meaningful_value" },
91+ static_input_maps = {"static" : "B1" },
92+ save_dir = TEST_DATA_DIR / "design"
93+ )
94+ assert results ['C01' ]['successful_key' ] is None # No match found
6095 assert results ['C02' ]['successful_key' ] == "OptA" # Option A worked passed the criteria
0 commit comments