Exemple #1
0
    def test_no_metrics(self, mock_logger):
        ret = parser._valid_minimal_config(self.no_metrics)
        self.assertFalse(ret)

        mock_logger.error.assert_called_with(
            'No metrics specified in configuration data.'
        )
    def test_binary_no_target(self, mock_logger):
        ret = parser._valid_minimal_config(self.binary_no_target)
        self.assertFalse(ret)

        mock_logger.error.assert_called_with(
            'Binary metric in configuration requires both a reference '
            'and target dataset to be present for evaluation. Please ensure '
            'that your config is well formed.')
    def test_unary_no_datasets(self, mock_logger):
        ret = parser._valid_minimal_config(self.unary_no_ref_or_target)
        self.assertFalse(ret)

        mock_logger.error.assert_called_with(
            'Unary metric in configuration data requires either a reference '
            'or target dataset to be present for evaluation. Please ensure '
            'that your config is well formed.')
Exemple #4
0
    def test_binary_no_target(self, mock_logger):
        ret = parser._valid_minimal_config(self.binary_no_target)
        self.assertFalse(ret)

        mock_logger.error.assert_called_with(
            'Binary metric in configuration requires both a reference '
            'and target dataset to be present for evaluation. Please ensure '
            'that your config is well formed.'
        )
Exemple #5
0
    def test_unary_no_datasets(self, mock_logger):
        ret = parser._valid_minimal_config(self.unary_no_ref_or_target)
        self.assertFalse(ret)

        mock_logger.error.assert_called_with(
            'Unary metric in configuration data requires either a reference '
            'or target dataset to be present for evaluation. Please ensure '
            'that your config is well formed.'
        )
Exemple #6
0
 def test_valid_binary(self):
     ret = parser._valid_minimal_config(self.binary_valid)
     self.assertTrue(ret)
Exemple #7
0
 def test_unary_with_target(self):
     ret = parser._valid_minimal_config(self.unary_with_target)
     self.assertTrue(ret)
Exemple #8
0
 def test_unary_with_reference(self):
     ret = parser._valid_minimal_config(self.unary_with_reference)
     self.assertTrue(ret)
 def test_valid_binary(self):
     ret = parser._valid_minimal_config(self.binary_valid)
     self.assertTrue(ret)
 def test_unary_with_target(self):
     ret = parser._valid_minimal_config(self.unary_with_target)
     self.assertTrue(ret)
 def test_unary_with_reference(self):
     ret = parser._valid_minimal_config(self.unary_with_reference)
     self.assertTrue(ret)
    def test_no_metrics(self, mock_logger):
        ret = parser._valid_minimal_config(self.no_metrics)
        self.assertFalse(ret)

        mock_logger.error.assert_called_with(
            'No metrics specified in configuration data.')