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