代码拉取完成,页面将自动刷新
同步操作将从 banzhuanxiaodoubi/wenjian 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
from abc import ABCMeta,abstractmethod
class Executor(metaclass=ABCMeta):
@abstractmethod
def deploy_env(self):
pass
@abstractmethod
def init_env(self):
pass
@abstractmethod
def get_case_code(self):
pass
@abstractmethod
def suite2cases_resolver(self):
pass
@abstractmethod
def run_all_cases(self):
pass
@abstractmethod
def run_suite(self):
pass
@abstractmethod
def run_case(self):
pass
class LogResolver(metaclass=ABCMeta):
@abstractmethod
def loads_logs(self, log_lines):
return log_lines
class Mugen:
def _executor(self):
return MugenExecutor()
class LTP:
def _executor(self):
return LtpExecutor()
class FrameWorkDict:
mugen = Mugen
ltp = LTP
class MugenExecutor:
def deploy_env(self):
pass
def init_env(self):
pass
def get_case_code(self):
pass
def suite2cases_resolver(self):
pass
def run_all_cases(self):
pass
def run_suite(self):
pass
def run_case(self):
print("mugen is ok")
class LtpExecutor:
def deploy_env(self):
pass
def init_env(self):
pass
def get_case_code(self):
pass
def suite2cases_resolver(self):
pass
def run_all_cases(self):
pass
def run_suite(self):
pass
def run_case(self):
print("ltp is ok ")
class LtpLogResolver:
def loads_logs(self, log_lines):
return log_lines
class MugenLogResolver:
def loads_logs(self, log_lines):
return log_lines
class ExecutorAdapter(Executor):
def __init__(self, executor):
self._executor=executor
def deploy_env(self):
self._executor.deploy_env()
def init_env(self):
self._executor.init_env()
def get_case_code(self):
self._executor.get_case_code()
def suite2cases_resolver(self):
self._executor.suite2cases_resolver()
def run_all_cases(self):
self._executor.run_all_cases()
def run_suite(self):
self._executor.run_suite()
def run_case(self):
self._executor.run_case()
# class LogResolverAdapt(LogResolver):
# def __init__(self, logresolver):
# self._logresolver=logresolver
class RunCaseHandler:
def __init__(self, framework):
self._framework = getattr(FrameWorkDict, framework)
def work(self):
self._executor = ExecutorAdapter(self._framework()._executor())
self._executor.run_case()
if __name__ == "__main__":
RunCaseHandler("ltp").work()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。