@@ -122,69 +122,6 @@ def test_invalid_design_matrix_format_raises_validation_error():
122
122
)
123
123
124
124
125
- def test_design_matrix_with_unknown_argument_uses_default (tmp_path , monkeypatch ):
126
- monkeypatch .chdir (tmp_path )
127
- with pd .ExcelWriter ("my_design_matrix.xlsx" ) as xl_write :
128
- design_matrix_df = pd .DataFrame (
129
- {
130
- "REAL" : [0 , 1 , 2 ],
131
- "a" : [1 , 2 , 3 ],
132
- "b" : [0 , 2 , 0 ],
133
- }
134
- )
135
- default_sheet_df = pd .DataFrame ([["a" , 1 ], ["b" , 4 ]])
136
- design_matrix_df .to_excel (xl_write , index = False , sheet_name = "DesignSheet" )
137
- default_sheet_df .to_excel (
138
- xl_write , index = False , sheet_name = "my_default_sheet" , header = False
139
- )
140
- assert (
141
- AnalysisConfig .from_dict (
142
- {
143
- ConfigKeys .NUM_REALIZATIONS : 3 ,
144
- ConfigKeys .DESIGN_MATRIX : [
145
- [
146
- os .path .abspath ("my_design_matrix.xlsx" ),
147
- "foo_argument:bar" ,
148
- "DEFAULT_SHEET:my_default_sheet" ,
149
- ]
150
- ],
151
- }
152
- ).design_matrix .design_sheet
153
- == "DesignSheet"
154
- )
155
-
156
-
157
- def test_design_matrix_with_too_many_arguments_fails (tmp_path , monkeypatch ):
158
- monkeypatch .chdir (tmp_path )
159
- with pd .ExcelWriter ("my_design_matrix.xlsx" ) as xl_write :
160
- design_matrix_df = pd .DataFrame (
161
- {
162
- "REAL" : [0 , 1 , 2 ],
163
- "a" : [1 , 2 , 3 ],
164
- "b" : [0 , 2 , 0 ],
165
- }
166
- )
167
- default_sheet_df = pd .DataFrame ([["a" , 1 ], ["b" , 4 ]])
168
- design_matrix_df .to_excel (xl_write , index = False , sheet_name = "DesignSheet" )
169
- default_sheet_df .to_excel (
170
- xl_write , index = False , sheet_name = "my_default_sheet" , header = False
171
- )
172
- with pytest .raises (ConfigValidationError , match = "Invalid argument 'too'" ):
173
- AnalysisConfig .from_dict (
174
- {
175
- ConfigKeys .NUM_REALIZATIONS : 3 ,
176
- ConfigKeys .DESIGN_MATRIX : [
177
- [
178
- os .path .abspath ("my_design_matrix.xlsx" ),
179
- "too" ,
180
- "many" ,
181
- "arguments" ,
182
- ]
183
- ],
184
- }
185
- )
186
-
187
-
188
125
def test_invalid_min_realization_percentage_raises_config_validation_error ():
189
126
with pytest .raises (
190
127
ConfigValidationError ,
0 commit comments