def test_logcat(device: AdbDevice): pc_dst = './something1.txt' android_dst = '/sdcard/something.txt' device.logcat.start(android_dst) time.sleep(2) device.logcat.sync_to_pc(pc_dst) assert device.say_hello(), 'should not abort other actions' time.sleep(2) device.logcat.stop(pc_dst, remove=True) assert os.path.isfile(pc_dst) os.remove(pc_dst)
def test_say_hello(device: AdbDevice): assert device.say_hello() == 'hello from {}'.format(device.serial)