摘要: 1、参考代码 import unittest class Test(unittest.TestCase): @classmethod def setUpClass(cls): print("start") @classmethod def tearDownClass(cls): print("end 阅读全文
posted @ 2020-04-08 17:13 Penny悦 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 1、安装HTMLTestRunner 这个不能用pip install 直接下载,需要在http://tungwaiyip.info/software/HTMLTestRunner.html这个网站下载 ps:可在firefox浏览器上下载,google的不能下载 将下载好的文件放到python文件 阅读全文
posted @ 2020-04-08 16:13 Penny悦 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 1、报错:TypeError: expected str, bytes or os.PathLike object, not NoneType 2、解决方法: 选择如下红框选中的内容 ps:如果需要新增,可以点击上方截图“+” 阅读全文
posted @ 2020-04-08 14:18 Penny悦 阅读(15056) 评论(1) 推荐(1) 编辑
摘要: 1、unittest框架小练习 # coding:utf-8 import unittest # 先导入unittest模块 class Test(unittest.TestCase): # 定义一个测试的类,并继承unittest.TestCase这个类 # 定义两个测试case名称:PS:测试用 阅读全文
posted @ 2020-04-08 14:14 Penny悦 阅读(199) 评论(0) 推荐(0) 编辑