Use instance.features in LazyStatic and Objective

This commit is contained in:
2021-03-31 09:21:34 -05:00
parent 5db4addfa5
commit 8fc9979b37
4 changed files with 38 additions and 29 deletions

View File

@@ -17,9 +17,11 @@ from tests.fixtures.knapsack import get_test_pyomo_instances
def test_xy_sample() -> None:
instance = cast(Instance, Mock(spec=Instance))
instance.get_instance_features = Mock( # type: ignore
return_value=[1.0, 2.0],
)
instance.features = {
"Instance": {
"User features": [1.0, 2.0],
}
}
sample: TrainingSample = {
"Lower bound": 1.0,
"Upper bound": 2.0,