Commit b6c53dfab8a5d8201b9263aab13c20bf69917d25

Authored by lixi
1 parent b7dd36c4

优化用例代码

Showing 2 changed files with 4 additions and 4 deletions
commons/Logging.py
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # -*- coding: UTF-8 -*- 2 # -*- coding: UTF-8 -*-
3 import logging,os 3 import logging,os
4 -from mylog import mylogger,logg 4 +# from mylog import mylogger,logg
5 5
6 6
7 class Logger(): 7 class Logger():
@@ -9,8 +9,8 @@ class Logger(): @@ -9,8 +9,8 @@ class Logger():
9 def __init__(self, path=__name__,clevel = logging.ERROR,Flevel = logging.DEBUG,test = 'w'): 9 def __init__(self, path=__name__,clevel = logging.ERROR,Flevel = logging.DEBUG,test = 'w'):
10 current_path=os.path.dirname(os.path.dirname(__file__)) 10 current_path=os.path.dirname(os.path.dirname(__file__))
11 path=current_path+"/report"+"/test.log" 11 path=current_path+"/report"+"/test.log"
12 - setattr(mylogger, "logpath", path)  
13 - logg.setting() 12 + # setattr(mylogger, "logpath", path)
  13 + # logg.setting()
14 14
15 self.logger = logging.getLogger(path) 15 self.logger = logging.getLogger(path)
16 16
@@ -74,6 +74,6 @@ if __name__ == "__main__": @@ -74,6 +74,6 @@ if __name__ == "__main__":
74 #检测登录接口 74 #检测登录接口
75 my.check_login("sy_user01") 75 my.check_login("sy_user01")
76 #创建测试套,运行测试用例,生成报告 76 #创建测试套,运行测试用例,生成报告
77 - report=Run_Testcase(Create_Testcase_suite("CZFW")) 77 + report=Run_Testcase(Create_Testcase_suite())
78 #发送邮件 78 #发送邮件
79 Send_email(report) 79 Send_email(report)