Esempio n. 1
0
 def test_datachunk(self):
     address = 0xf00fba11
     data = b"\x00\x01\xff\x12"
     data_chunk = DataChunk(address, memoryview(data))
     self.assertEqual(address, data_chunk.address())
     self.assertCountEqual(data, data_chunk.buffer())
Esempio n. 2
0
 def test_datachunk(self):
     address = 0xf00fba11
     data = b"\x00\x01\xff\x12"
     data_chunk = DataChunk(address, memoryview(data))
     self.assertEqual(address, data_chunk.address())
     self.assertCountEqual(data, data_chunk.buffer())
Esempio n. 3
0
 def test_datachunk(self):
     address = 0xf00fba11
     data = array('c', ['\x00', '\x01', '\xff', '\x12'])
     data_chunk = DataChunk(address, buffer(data))
     self.assertEqual(address, data_chunk.address())
     self.assertItemsEqual(data, data_chunk.buffer())
Esempio n. 4
0
 def test_datachunk(self):
     address = 0xf00fba11
     data = array('c', ['\x00', '\x01', '\xff', '\x12'])
     data_chunk = DataChunk(address, buffer(data))
     self.assertEqual(address, data_chunk.address())
     self.assertItemsEqual(data, data_chunk.buffer())