def setUp(self): logging.info(f'script{__file__.split("script")[1]}') self.Step("预制条件1:将待测试文件从自启动移除") self.file = r'/usr/share/applications/dde-file-manager.desktop' logging.info(f'待移除的自启动项path:{self.file}') sessionManagerStartManager.remove_autostart(self.file) time.sleep(1)
def tearDown(self): time.sleep(1) self.Step("收尾:移除自启动项") sessionManagerStartManager.remove_autostart(self.file) time.sleep(1)