def test_Probabilities_format_validate_negative(self):
     filepath = self.get_data_path('garbage.txt')
     format = ProbabilitiesFormat(filepath, mode='r')
     with self.assertRaisesRegex(ValidationError, 'two or more fields'):
         format.validate()
 def test_Probabilities_format_validate_negative_nonnumeric(self):
     filepath = self.get_data_path('chardonnay.map.txt')
     format = ProbabilitiesFormat(filepath, mode='r')
     with self.assertRaisesRegex(ValidationError, 'numeric values'):
         format.validate()
 def test_Probabilities_format_validate_negative_empty(self):
     filepath = self.get_data_path('empty_file.txt')
     format = ProbabilitiesFormat(filepath, mode='r')
     with self.assertRaisesRegex(ValidationError, 'one data record'):
         format.validate()
 def test_Probabilities_format_validate_positive(self):
     filepath = self.get_data_path('class_probabilities.tsv')
     format = ProbabilitiesFormat(filepath, mode='r')
     format.validate(level='min')
     format.validate()