MCPcopy Create free account
hub / github.com/anyoptimization/pymoo / test_problems

Function test_problems

tests/problems/test_problems_df.py:16–35  ·  view source on GitHub ↗
(name, params)

Source from the content-addressed store, hash-verified

14
15@pytest.mark.parametrize('name,params', problems)
16def test_problems(name, params):
17 if name == 'DF13':
18 pytest.skip("DF13 has numerical issues")
19
20 nt, taut = params
21
22 problem = get_problem(name, nt=nt, taut=taut)
23
24 X, F, T = load("problems", "DF", name, attrs=["x", "f", "t"])
25
26 _F = []
27 i = 0
28 for x_i in X:
29 problem.tau = T[i]
30 f_i = problem.evaluate(x_i)
31 _F.append(f_i)
32 i += 1
33 _F = np.array(_F)
34
35 np.testing.assert_allclose(_F, F)
36
37
38@pytest.mark.parametrize('name,params', problems)

Callers

nothing calls this directly

Calls 4

get_problemFunction · 0.90
loadFunction · 0.90
evaluateMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…