Skip to content

Commit 90590b3

Browse files
Update tests/test_sensitivity_analysis.py
Co-authored-by: Sam Greenbury <[email protected]>
1 parent 0dcfb39 commit 90590b3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tests/test_sensitivity_analysis.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,21 @@ def sobol_results_1d(model_1d):
150150

151151
# # test conversion to DataFrame --------------------------------------------------
152152
@pytest.mark.filterwarnings("ignore::FutureWarning")
153-
def test_sobol_results_to_df(sobol_results_1d):
153+
@pytest.mark.parametrize(
154+
"problem, expected_names",
155+
[
156+
(
157+
{
158+
"num_vars": 2,
159+
"names": ["c", "v0"],
160+
"bounds": [(-5.0, 1.0), (0.0, 1000.0)],
161+
},
162+
["c", "v0", "c-v0"],
163+
),
164+
(None, ["X1", "X2", "X1-X2"]),
165+
],
166+
)
167+
def test_sobol_results_to_df(sobol_results_1d, problem, expected_names):
154168
problem = {
155169
"num_vars": 2,
156170
"names": ["c", "v0"],

0 commit comments

Comments
 (0)