随笔分类 -  unittest 单元测试框架

摘要:alex和egon的故事: True zhangsan zhangsan {'name': 'zhangsan', 'address': 'addr', 'func': <function <lambda> at 0x037F0270>} zhangsanadd 动态导入模块: 执行: 反射重写at 阅读全文
posted @ 2020-03-11 20:00 不带R的墨菲特 阅读(166) 评论(1) 推荐(0) 编辑
摘要:# coding=utf-8import unittestfrom inspect import isfunctiondef usage(): """also unittest.__dict__""" print(unittest.__all__)def stdout_writeText(): su 阅读全文
posted @ 2019-11-18 15:41 不带R的墨菲特 阅读(510) 评论(0) 推荐(0) 编辑
摘要:解决方案一直接改unittest源代码: 把排序240行逻辑注释掉,237行获取成员方法按照dict方法替换原有的dir() 方法 验证效果: 比较猥琐的解决方案2 获取成员变量class.__dict__.keys() filter过滤符合要求成员,由于3.x成员dict属性是支持有序的 # co 阅读全文
posted @ 2019-11-18 15:17 不带R的墨菲特 阅读(355) 评论(2) 推荐(0) 编辑
摘要:cmd 执行unittest case : python -m unitest test.py test2.py python -m unittest testfile.testclass.testmethod python -m unittest discover -s "./" -p "test 阅读全文
posted @ 2019-07-31 12:57 不带R的墨菲特 阅读(293) 评论(0) 推荐(0) 编辑
摘要:unittest失败重跑截图 阅读全文
posted @ 2019-04-12 22:50 不带R的墨菲特 阅读(1203) 评论(1) 推荐(0) 编辑
摘要:指数 模块 | 下一个 | 上一个 | Python » 英语 法国 日本 朝鲜的 开发(3.8) 3.7.3rc1 3.6 3.5 2.7 文档 » Python标准库 » 开发工具 » | unittest- 单元测试框架 源代码: Lib / unittest / __ init__.py ( 阅读全文
posted @ 2019-03-23 23:42 不带R的墨菲特 阅读(651) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示