摘要:
1 import logging 2 3 4 def handle(): 5 # 1、定义logger对象:负责产生日志,然后交给Filter过滤,然后交给不同的Handler输出 6 logger = logging.getLogger() 7 8 # logger.setLevel("DEBUG 阅读全文
摘要:
1 def xlrdWay(): 2 3 file_dir = r"C:\Users\admin\Desktop\showdata.xlsx" 4 data = xlrd.open_workbook(file_dir) 5 6 table = data.sheet_by_name('APIcase' 阅读全文
摘要:
1 from selenium import webdriver 2 import ddt 3 import time 4 import unittest 5 6 """ 7 DDT(驱动.json文件) 8 """ 9 10 11 @ddt.ddt 12 class TestLogin(unitt 阅读全文
摘要:
1 from selenium import webdriver 2 import ddt 3 import time 4 import unittest 5 6 @ddt.ddt 7 class TestLogin(unittest.TestCase): 8 9 @classmethod 10 d 阅读全文
摘要:
1 class TestEnorll(): 2 3 def get_data(self): 4 """ 5 读取json文件 6 :return: 7 """ 8 data = [] 9 with open(self, 'r') as f: 10 dict_data = json.loads(f.r 阅读全文
摘要:
1 from page.LoginPage import Loginpage 2 import os, sys, pytest 3 4 base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 5 sys.path. 阅读全文