def test_read_int_not_enough_bits(self): with self.assertRaises(EOFError): byte_stream = pack('<H',3) byte_stream = bytearray(byte_stream) reader = LittleEndianByteArrayByteReader(byte_stream) value = reader.read_int()
def test_read_int(self): byte_stream = pack('<I',0xFF12) byte_stream = bytearray(byte_stream) reader = LittleEndianByteArrayByteReader(byte_stream) value = reader.read_int() self.assertEqual(value,0xFF12)