Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6ae9dc3

Browse files
committedMar 19, 2025·
fixup - remove unneccessary tests
1 parent 88cbaec commit 6ae9dc3

File tree

2 files changed

+1
-64
lines changed

2 files changed

+1
-64
lines changed
 

‎tests/ert/ui_tests/cli/analysis/test_design_matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def test_run_poly_example_with_design_matrix_and_genkw_merge(default_values, err
156156
MIN_REALIZATIONS 1
157157
GEN_DATA POLY_RES RESULT_FILE:poly.out
158158
GEN_KW COEFFS my_template my_output coeff_priors
159-
DESIGN_MATRIX poly_design.xlsx
159+
DESIGN_MATRIX poly_design.xlsx DESIGN_SHEET:DesignSheet DEFAULT_SHEET:DefaultSheet
160160
INSTALL_JOB poly_eval POLY_EVAL
161161
FORWARD_MODEL poly_eval
162162
"""

‎tests/ert/unit_tests/config/test_analysis_config.py

-63
Original file line numberDiff line numberDiff line change
@@ -122,69 +122,6 @@ def test_invalid_design_matrix_format_raises_validation_error():
122122
)
123123

124124

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-
188125
def test_invalid_min_realization_percentage_raises_config_validation_error():
189126
with pytest.raises(
190127
ConfigValidationError,

0 commit comments

Comments
 (0)
Please sign in to comment.