Components: Switch from factory methods to prototype objects

This commit is contained in:
2021-04-01 08:34:56 -05:00
parent 59c734f2a1
commit bc8fe4dc98
9 changed files with 43 additions and 34 deletions

View File

@@ -22,6 +22,7 @@ def test_lazy_fit():
instances[0].found_violated_lazy_constraints = ["a", "b"]
instances[1].found_violated_lazy_constraints = ["b", "c"]
classifier = Mock(spec=Classifier)
classifier.clone = lambda: Mock(spec=Classifier)
component = DynamicLazyConstraintsComponent(classifier=classifier)
component.fit(instances)