示例#1
0
    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')
示例#2
0
    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')