摘要: 1 import logging.config 2 import logging 3 import configparser 4 import codecs 5 class Log(object): 6 def __init__(self): 7 cp = configparser.SafeConfigParser() 8 cp.read(... 阅读全文
posted @ 2017-08-07 18:33 殇城林 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 一: 封装log模块, 在自动化测试中日志输出,在配置文件中配置需输出的位置 , 1为输出, 0不输出。 Log.py 1 import logging 2 import sys 3 import configparser 4 5 class Log: 6 def __init__(self): 7 阅读全文
posted @ 2017-08-06 12:20 殇城林 阅读(739) 评论(0) 推荐(0) 编辑
摘要: import xlrd import xlwt from xlutils.copy import copy class Excel: """ Excel表格封装 1. 读取Excel的数据 2. 数据写入到Excel中 """ def __init__(self): self.path = "E:\ 阅读全文
posted @ 2017-07-11 09:41 殇城林 阅读(3295) 评论(0) 推荐(0) 编辑
摘要: 安装步骤: 4. 新建新的自由项目 阅读全文
posted @ 2017-07-11 09:38 殇城林 阅读(222) 评论(0) 推荐(0) 编辑
摘要: import xlwt from xlrd import * from xlutils.copy import copy from datetime import datetime import time path = r"H:\pycharm\untitled2\python_study\test\write.xlsx" def write(): """写入单个数据""" rb... 阅读全文
posted @ 2017-07-10 11:08 殇城林 阅读(8989) 评论(0) 推荐(0) 编辑