def test_get(self): ''' Test that the get bit operation is correct ''' barray = BitArray(array=[0xEC]) for pos, val in {0:False, 1:False, 4:True}.items(): self.assertEqual(val, barray.get(pos)) barray = BitArray(array=[0x00]) for pos in [0, 1, 4]: self.assertEqual(False, barray.get(pos))