()
| 426 | |
| 427 | |
| 428 | def test_BaseEstimator(): |
| 429 | class Class(ot.utils.BaseEstimator): |
| 430 | def __init__(self, first="spam", second="eggs"): |
| 431 | self.first = first |
| 432 | self.second = second |
| 433 | |
| 434 | cl = Class() |
| 435 | |
| 436 | names = cl._get_param_names() |
| 437 | assert "first" in names |
| 438 | assert "second" in names |
| 439 | |
| 440 | params = cl.get_params() |
| 441 | assert "first" in params |
| 442 | assert "second" in params |
| 443 | |
| 444 | params["first"] = "spam again" |
| 445 | cl.set_params(**params) |
| 446 | |
| 447 | with pytest.raises(ValueError): |
| 448 | cl.set_params(bibi=10) |
| 449 | |
| 450 | assert cl.first == "spam again" |
| 451 | |
| 452 | |
| 453 | def test_OTResult(): |
nothing calls this directly
no test coverage detected