Beispiel #1
0
 def testOffsetIncrease(self):
     s = ByteStore(bytearray([1, 1, 1]), 24, 0)
     t = offsetcopy(s, 4)
     self.assertEqual(t.bitlength, 24)
     self.assertEqual(t.offset, 4)
     self.assertEqual(t._rawarray, bytearray([0, 16, 16, 16]))
Beispiel #2
0
 def testStraightCopy(self):
     s = ByteStore(bytearray([10, 5, 1]), 24, 0)
     t = offsetcopy(s, 0)
     self.assertEqual(t._rawarray, bytearray([10, 5, 1]))
Beispiel #3
0
 def testStraightCopy(self):
     s = ByteStore(bytearray([10, 5, 1]), 24, 0)
     t = offsetcopy(s, 0)
     self.assertEqual(t._rawarray, bytearray([10, 5, 1]))
Beispiel #4
0
 def testOffsetIncrease(self):
     s = ByteStore(bytearray([1, 1, 1]), 24, 0)
     t = offsetcopy(s, 4)
     self.assertEqual(t.bitlength, 24)
     self.assertEqual(t.offset, 4)
     self.assertEqual(t._rawarray, bytearray([0, 16, 16, 16]))