def ExpectFlash(self, partition, succeed=True):
    self.usb.ExpectWrite('flash:%s' % partition)
    self.usb.ExpectRead('INFORandom info from the bootloader')
    if succeed:
      self.usb.ExpectRead('OKAYDone')
    else:
      self.usb.ExpectRead('FAILDone')
dataset/ETHPy150Open google/python-adb/test/fastboot_test.py/FastbootTest.ExpectFlash/original