def test_train(self): metric = AdvancedMetric('test') metric.process_train = Mock() metric.process_final_train = Mock() metric.train() metric.process('testing') metric.process_train.assert_called_once_with('testing') metric.process_final('testing') metric.process_final_train.assert_called_once_with('testing')
def test_eval(self): metric = AdvancedMetric('test') metric.process_validate = Mock() metric.process_final_validate = Mock() metric.eval() metric.process('testing') metric.process_validate.assert_called_once_with('testing') metric.process_final('testing') metric.process_final_validate.assert_called_once_with('testing')
def test_empty_methods(self): metric = AdvancedMetric('test') self.assertTrue(metric.process_train() is None) self.assertTrue(metric.process_final_train() is None) self.assertTrue(metric.process_validate() is None) self.assertTrue(metric.process_final_validate() is None)