X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_field_class.py;h=6914dc0f01b9b9f3a9386c8ab34b43682c8d3ffc;hb=3b2be7085899350a58fe836dc5e1a9650ce369b2;hp=2b05f0096cfab2bc8213d98834c6bc2033e0b377;hpb=d09c69f7ecf93e6d9d064a0453cf971ee3ff7778;p=babeltrace.git diff --git a/tests/bindings/python/bt2/test_field_class.py b/tests/bindings/python/bt2/test_field_class.py index 2b05f009..6914dc0f 100644 --- a/tests/bindings/python/bt2/test_field_class.py +++ b/tests/bindings/python/bt2/test_field_class.py @@ -132,7 +132,7 @@ class _EnumerationFieldClassTestCase(_TestIntegerFieldClassProps): self._fc.add_mapping('allo', 'meow') def test_add_mapping_dup_label(self): - with self.assertRaises(bt2.Error): + with self.assertRaises(ValueError): self._fc.add_mapping('a', self._ranges1) self._fc.add_mapping('a', self._ranges2) @@ -263,7 +263,7 @@ class _TestElementContainer: sub_fc1 = self._tc.create_string_field_class() sub_fc2 = self._tc.create_string_field_class() - with self.assertRaises(bt2.Error): + with self.assertRaises(ValueError): self._append_element_method(self._fc, 'yes', sub_fc1) self._append_element_method(self._fc, 'yes', sub_fc2) @@ -446,7 +446,7 @@ class _VariantFieldClassWithSelectorTestCase: sub_fc1 = self._tc.create_string_field_class() sub_fc2 = self._tc.create_string_field_class() - with self.assertRaises(bt2.Error): + with self.assertRaises(ValueError): self._fc.append_option('yes', sub_fc1, self._ranges1) self._fc.append_option('yes', sub_fc2, self._ranges2)