Beispiel #1
0
    def test_solo_strategy(self):
        want = [
            ensemble.Candidate("{}_solo".format(self.fake_builder_1.name),
                               [self.fake_builder_1], []),
            ensemble.Candidate("{}_solo".format(self.fake_builder_2.name),
                               [self.fake_builder_2], [])
        ]
        got = ensemble.SoloStrategy().generate_ensemble_candidates(
            [self.fake_builder_1, self.fake_builder_2], None)

        self.assertEqual(want, got)
Beispiel #2
0
    def test_solo_strategy_with_previous_ensemble_subnetwork_builders(self):
        want = [
            ensemble.Candidate("{}_solo".format(self.fake_builder_1.name),
                               [self.fake_builder_1], []),
            ensemble.Candidate("{}_solo".format(self.fake_builder_2.name),
                               [self.fake_builder_2], [])
        ]
        got = ensemble.SoloStrategy().generate_ensemble_candidates(
            [self.fake_builder_1, self.fake_builder_2],
            [self.fake_builder_3, self.fake_builder_4])

        self.assertEqual(want, got)