摘要: 基础读取配置文件 -read(filename) 直接读取文件内容 -sections() 得到所有的section,并以列表的形式返回 -options(section) 得到该section的所有option -items(section) 得到该section的所有键值对 -get(secti 阅读全文
posted @ 2018-11-07 10:05 邪狂 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1、传入一个参数 2、传入元组、字典、列表等复杂结构数据,@data 标签结合 @unpack使用 3、以文件作为数据传递@file_data 传递json数据 import unittest from ddt import ddt,data,unpack,file_data @ddt class 阅读全文
posted @ 2018-11-05 16:16 邪狂 阅读(181) 评论(1) 推荐(0) 编辑
摘要: 用例与用例直接的依赖关系(耦合关系) 方法一: 在 初始化中 处理共用的数据 (充值cookie的处理方法) 方法二: 使用 全局变量 处理共用的数据 (充值cookie的处理方法) 方法三: 1)放射方法介绍: class GetData: Cookie='小郭' setattr(GetData, 阅读全文
posted @ 2018-11-02 10:56 邪狂 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Python的GC模块主要运用了“引用计数”(reference counting)来跟踪和回收垃圾。在引用计数的基础上,还可以通过“标记-清除”(mark and sweep)解决容器对象可能产生的循环引用的问题。通过“分代回收”(generation collection)以空间换取时间来进一步 阅读全文
posted @ 2018-11-01 15:38 邪狂 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1、断言 断言处理: 异常抛出 4、夹心饼干 初始化操作 阅读全文
posted @ 2018-10-31 21:37 邪狂 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 接口测试的本质 就是测试类里面的函数、 单元测试的本质 测试函数 代码级别 单元测试框架 unittest 接口 pytest web 功能测试: 1、写用例 > TestCase 2、执行用例 > 1:TestSuite 存储用例 2:TestLoader > 找用例 ,加载用例,存到1的test 阅读全文
posted @ 2018-10-31 20:39 邪狂 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1、get请求: 看源码 2、post #和 res.json(),响应正文的格式不同,# 如果是 html、xml、json -->可以是 text#只有json类型的返回值才支持json 3、cookies res.cookies 类字典形式,可以 res.cookies[key] 4、模拟浏览 阅读全文
posted @ 2018-10-28 14:57 邪狂 阅读(135) 评论(0) 推荐(0) 编辑
摘要: https://github.com/small99/AutoLink https://github.com/small99/autohub Navicat for Mysql 破解办法: https://jingyan.baidu.com/article/3c343ff7a3e0420d37796 阅读全文
posted @ 2018-10-26 10:01 邪狂 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 第二种方法: 阅读全文
posted @ 2018-10-25 20:45 邪狂 阅读(302) 评论(0) 推荐(0) 编辑
摘要: f = open('testJson.json','a',encoding="utf-8")for each in root1.getiterator("person"): tempDict = each.attrib for childNode in each.getchildren(): # 利 阅读全文
posted @ 2018-10-19 16:10 邪狂 阅读(6408) 评论(0) 推荐(0) 编辑
柔柔弱弱