Example #1
0
    def test_create(self):
        """
        Test for method create.
        Should searching for the metric by name and instantiates the according calculation function
        """
        for implemented_metric in self.all_implemented_metrics:
            self.assertIsInstance(Scorer.create(implemented_metric), types.FunctionType)

        for not_implemented_metric in self.some_not_implemented_metrics:
            self.assertIsNone(Scorer.create(not_implemented_metric))