()
| 215 | |
| 216 | |
| 217 | def test_max(): |
| 218 | PBOUNDS = {"p1": (0, 10), "p2": (1, 100)} |
| 219 | space = TargetSpace(target_func, PBOUNDS) |
| 220 | |
| 221 | assert space.max() is None |
| 222 | space.probe(params={"p1": 1, "p2": 2}) |
| 223 | space.probe(params={"p1": 5, "p2": 4}) |
| 224 | space.probe(params={"p1": 2, "p2": 3}) |
| 225 | space.probe(params={"p1": 1, "p2": 6}) |
| 226 | assert space.max() == {"params": {"p1": 5, "p2": 4}, "target": 9} |
| 227 | |
| 228 | |
| 229 | def test_max_with_constraint(): |
nothing calls this directly
no test coverage detected