def test2bytes(self): self.assertEqual(a2lsbi([1, 0]), 1) self.assertEqual(a2lsbi([0xff, 0]), 0xff) self.assertEqual(a2lsbi([0x80, 0]), 0x80) self.assertEqual(a2lsbi([0, 1]), 0x100) self.assertEqual(a2lsbi([0, 0xff]), 0xff00) self.assertEqual(a2lsbi([0, 0x80]), 0x8000)
def test1byte(self): self.assertEqual(a2lsbi([8]), 8) self.assertEqual(a2lsbi([0xff]), 0xff) self.assertEqual(a2lsbi([0x80]), 0x80)
def test0(self): self.assertEqual(a2lsbi([0]), 0) self.assertEqual(a2lsbi([0] * 3), 0) self.assertEqual(a2lsbi([0] * 10), 0)
def test0(self): self.assertEqual(a2lsbi([0]), 0) self.assertEqual(a2lsbi([0]*3), 0) self.assertEqual(a2lsbi([0]*10), 0)