Esempio n. 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)
Esempio n. 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')