def tearDown(self): self.Step("收尾:无") for item in range(1, 200): if abRecovery.backing_up(): time.sleep(5) logging.info(f'备份未结束,第{item}圈') continue else: logging.info('备份结束') break
def setUp(self): self.Step("预制条件1:不开启备份") time.sleep(2) for item in range(1, 200): if abRecovery.backing_up(): time.sleep(5) logging.info(f'备份未结束,第{item}圈') continue else: logging.info('备份结束') break
def test_step(self): self.Step("步骤2:完成备份一次") abRecovery.start_backup() time.sleep(2) for item in range(1, 200): if abRecovery.backing_up(): time.sleep(5) logging.info(f'备份未结束,第{item}圈') continue else: logging.info('备份结束') break self.Step( """步骤3:解析dbus-monitor结果,是否监控到 JobEnd 信号,判断'string "backup"'是否在返回值中""" ) abRecovery.jobEnd(self.dbus_monitor, self.parse_flgs) time.sleep(5)