Exemplo n.º 1
0
 def test_create_invalid_field_class(self):
     with self.assertRaises(TypeError):
         self._fc = bt2.ArrayFieldClass(object(), 'the.length')
Exemplo n.º 2
0
 def test_create_invalid_length(self):
     with self.assertRaises(ValueError):
         self._fc = bt2.ArrayFieldClass(bt2.StringFieldClass(), -17)
Exemplo n.º 3
0
 def test_create_invalid_length_type(self):
     with self.assertRaises(TypeError):
         self._fc = bt2.ArrayFieldClass(bt2.StringFieldClass(), 'the length')
Exemplo n.º 4
0
 def setUp(self):
     self._elem_fc = bt2.IntegerFieldClass(23)
     self._fc = bt2.ArrayFieldClass(self._elem_fc, 45)