def testGetBit(self): a = ConstByteStore(bytearray([0x0f])) self.assertEqual(a.getbit(0), False) self.assertEqual(a.getbit(3), False) self.assertEqual(a.getbit(4), True) self.assertEqual(a.getbit(7), True) b = ConstByteStore(bytearray([0x0f]), 7, 1) self.assertEqual(b.getbit(2), False) self.assertEqual(b.getbit(3), True)