上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 96 下一页
摘要: About unittest是Python内置的单元测试框架(模块),不仅可以完成单元测试,也适用于web自动化测试中。 unittest提供了丰富的断言方法,判断测试用例是否通过,然后生成测试结果报告。 必要的准备与注意事项 首先,我们准备这样一个目录: M:\tests\ # 我的是M盘的tes 阅读全文
posted @ 2020-01-28 12:41 干it的小张 阅读(321) 评论(0) 推荐(0)
摘要: sys: 从Python3.2版本开始,sys模块移除了sys.setdefaultencoding方法,因为该setfaultencoding方法是在解决Python2.x中的字符编码的问题,而Python3.x中使用utf8后,就不再需要使用该方法 hashlib: import hashlib 阅读全文
posted @ 2020-01-27 19:04 干it的小张 阅读(259) 评论(0) 推荐(0)
摘要: 1.把软件开发规范的相关目录建立起来 2、配置settings: import osimport datetimeimport shutilimport sysbase_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 阅读全文
posted @ 2020-01-26 21:23 干it的小张 阅读(782) 评论(0) 推荐(0)
摘要: 什么是日志 日志是对软件执行时所发生事件的一种追踪方式。软件开发人员对他们的代码添加日志调用,借此来指示某事件的发生。一个事件通过一些包含变量数据的描述信息来描述(比如:每个事件发生时的数据都是不同的)。开发者还会区分事件的重要性,重要性也被称为等级或严重性。 什么时候使用日志 日志(logging 阅读全文
posted @ 2020-01-26 20:14 干it的小张 阅读(231) 评论(0) 推荐(0)
摘要: import os# 导入压缩文件用的模块import zipfileBASE = os.path.dirname(os.path.abspath(__file__))print(BASE)# 要压缩文件夹的根路径并拼接:base_dir = os.path.join(BASE,"allure_ht 阅读全文
posted @ 2020-01-25 17:42 干it的小张 阅读(288) 评论(0) 推荐(0)
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 96 下一页