Ejemplo n.º 1
0
 def test_array_unicode(self):
     aType = 'u'
     l_List = ('a','b','c')
     aa = arrayTypes()
     theArray = aa.createArray(aType,l_List)
     for member in theArray:
         self.assertTrue(isinstance(member, str))
Ejemplo n.º 2
0
 def test_array_Short(self):
     aType = 'h'
     l_List = (-10001,+20002) #,200001,300001,400001,500001)
     aa = arrayTypes()
     theArray = aa.createFreeArray(aType,l_List)
     print("Array is ",theArray)
     for member in theArray:
         self.assertTrue(isinstance(member, int))   
Ejemplo n.º 3
0
 def test_array_DoubleFloat(self):
     aType = 'd'
     l_List = (0.1000000000001,0.20000000000000000000000000000001)
     aa = arrayTypes()
     theArray = aa.createFreeArray(aType,l_List)
     print("Array is ",theArray)
     for member in theArray:
         self.assertTrue(isinstance(member, float)) 
Ejemplo n.º 4
0
 def test_array_UnsignedLong(self):
     aType = 'L'
     l_List = (1,5000000000000000001)
     aa = arrayTypes()
     theArray = aa.createFreeArray(aType,l_List)
     print("Array is ",theArray)
     for member in theArray:
         self.assertTrue(isinstance(member, int)) 
Ejemplo n.º 5
0
 def test_array_int(self):
     aType = 'i'
     l_List = (1,2,3)
     aa = arrayTypes()
     theArray = aa.createFreeArray(aType,l_List)
     print("Array is ",theArray)
     for member in theArray:
         self.assertTrue(isinstance(member, int))
Ejemplo n.º 6
0
 def test_array_UnsignedLongOverflowError(self):
     aType = 'L'
     l_List = (100000000001,50000000000000000011)
     aa = arrayTypes()
     self.assertRaises(OverflowError,aa.createFreeArray,aType,l_List)
Ejemplo n.º 7
0
 def test_array_TypeError(self):
     aType = 'u'
     l_List = ('a','b','c',1)
     aa = arrayTypes()
     self.assertRaises(TypeError,aa.createArray,aType,l_List)