Commit 224ffd159bc17ab872174c1ef065b7ece6b845f3
1 parent
75bad4d8
删除print信息
Showing
2 changed files
with
3 additions
and
5 deletions
commons/scripts/delReport.py
... | ... | @@ -12,16 +12,16 @@ |
12 | 12 | import os,sys |
13 | 13 | |
14 | 14 | def delReport(path,delNum=5): |
15 | - print("path",path) | |
15 | + # print("path",path) | |
16 | 16 | if os.name == "nt": |
17 | 17 | report_route = os.path.abspath(os.path.join(path, "../")) |
18 | 18 | else: |
19 | 19 | report_route = os.path.abspath(os.path.join(path)) |
20 | 20 | file_list = os.listdir(report_route + "/report/") |
21 | - print("delReport file_lis --- ", file_list) | |
21 | + # print("delReport file_lis --- ", file_list) | |
22 | 22 | if len(file_list) > delNum: |
23 | 23 | file_list = file_list[:0-delNum] |
24 | - print("if file_lis --- ",file_list) | |
24 | + # print("if file_lis --- ",file_list) | |
25 | 25 | for i in file_list: |
26 | 26 | if os.path.isfile(report_route + "/report/" + i) and ".log" not in i: |
27 | 27 | os.remove(report_route + "/report/" + i) | ... | ... |
main.py
... | ... | @@ -38,7 +38,6 @@ def Run_Testcase(testsuit): |
38 | 38 | '''运行测试用例并生成报告''' |
39 | 39 | now = time.strftime("%Y-%m-%d %H_%M_%S", time.localtime()) |
40 | 40 | path = os.path.dirname(os.path.abspath(sys.argv[0])) |
41 | - print("path -1- ",path) | |
42 | 41 | report_file = os.path.abspath(os.path.join(path))+ "/report/" + now + "_result.html" |
43 | 42 | # 创建报告文件 |
44 | 43 | fp = open(report_file, 'wb') |
... | ... | @@ -51,7 +50,6 @@ def Run_Testcase(testsuit): |
51 | 50 | runner.run(testsuit) |
52 | 51 | # 关闭文件 |
53 | 52 | fp.close() |
54 | - print("path -1- ", path) | |
55 | 53 | delReport.delReport(path) |
56 | 54 | return report_file |
57 | 55 | ... | ... |