def createImage(self, record_type, s5record, start_address=None): image = Image() image.insert_section(range(10), 0x1000) image.join_sections() return dumps("srec", image, record_type=record_type, s5record=s5record, start_address=start_address)
def testLoadsWorks(self): image = Image() image.insert_section( "Wow! Did you really go through al that trouble to read this?", 0xb000) image.join_sections() self.assertEqual( dumps("srec", image, record_type=1, s5record=False, start_address=0x0000), SREC1)
def testImageRepresentation(self): image = Image() image.insert_section([x % 256 for x in range(10000)]) image.join_sections() self.assertEqual(repr(image), RESULT)