def test_get_config_with_stuff(self): c1 = DummyClassifier() c2 = DummyClassifier() ccol = ClassifierCollection({'a': c1}, b=c2) # dummy returns {} config. self.assertEqual( ccol.get_config(), { 'a': {'DummyClassifier': {}, 'type': 'DummyClassifier'}, 'b': {'DummyClassifier': {}, 'type': 'DummyClassifier'}, } )
def test_get_config_with_stuff(self): c1 = DummyClassifier() c2 = DummyClassifier() ccol = ClassifierCollection({'a': c1}, b=c2) # dummy returns {} config. self.assertEqual( ccol.get_config(), { 'a': { 'tests.algorithms.classifier.test_ClassifierAbstract' '.DummyClassifier': {}, 'type': 'tests.algorithms.classifier' '.test_ClassifierAbstract.DummyClassifier' }, 'b': { 'tests.algorithms.classifier.test_ClassifierAbstract' '.DummyClassifier': {}, 'type': 'tests.algorithms.classifier' '.test_ClassifierAbstract.DummyClassifier' } })
def test_get_config_empty(self): # The config coming out of an empty collection should be an empty # dictionary. ccol = ClassifierCollection() self.assertEqual(ccol.get_config(), {})