From 838dcc4bc7f992c1f3859f85fc155050c0e6a217 Mon Sep 17 00:00:00 2001 From: Qi Gao Date: Fri, 21 Dec 2018 21:40:05 +0800 Subject: [PATCH] fix clear init bug (#12) --- lyrebird_api_coverage/app_ui.py | 7 ++++++- setup.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lyrebird_api_coverage/app_ui.py b/lyrebird_api_coverage/app_ui.py index efbf42f..042b276 100644 --- a/lyrebird_api_coverage/app_ui.py +++ b/lyrebird_api_coverage/app_ui.py @@ -47,7 +47,12 @@ def resume_test(self): def clear_result(self): ResultHandler().clear_cache_result() - self.get_coverage() + # 获取基准文件 + base_dict = BaseDataHandler().get_base_source() + # 初始化正常会进行数据的处理:覆盖率初始化 & API LIST初始化 + if not isinstance(base_dict, Response): + mergeAlgorithm.first_result_handler(base_dict) + mergeAlgorithm.coverage_arithmetic(base_dict) lyrebird.publish('api_coverage', 'operation', name='clear_result') return context.make_ok_response() diff --git a/setup.py b/setup.py index 6ee6f1e..a9e5c29 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='lyrebird-api-coverage', - version='0.2.7', + version='0.2.8', packages=['lyrebird_api_coverage'], url='https://github.com/meituan/lyrebird-api-coverage', author='HBQA',