Пример #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.'
        )
Пример #2
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.')
Пример #3
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.')
Пример #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.'
        )
Пример #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.'
        )
Пример #6
0
 def test_valid_binary(self):
     ret = parser._valid_minimal_config(self.binary_valid)
     self.assertTrue(ret)
Пример #7
0
 def test_unary_with_target(self):
     ret = parser._valid_minimal_config(self.unary_with_target)
     self.assertTrue(ret)
Пример #8
0
 def test_unary_with_reference(self):
     ret = parser._valid_minimal_config(self.unary_with_reference)
     self.assertTrue(ret)
Пример #9
0
 def test_valid_binary(self):
     ret = parser._valid_minimal_config(self.binary_valid)
     self.assertTrue(ret)
Пример #10
0
 def test_unary_with_target(self):
     ret = parser._valid_minimal_config(self.unary_with_target)
     self.assertTrue(ret)
Пример #11
0
 def test_unary_with_reference(self):
     ret = parser._valid_minimal_config(self.unary_with_reference)
     self.assertTrue(ret)
Пример #12
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.')