yandyand

导航

2020年11月9日 #

python测试模块unittest使用

摘要: #:unittest模块的使用 # :unittest模块测试# :!!!!!!注意此次的测试用例方法必须以: testXxx来进行命名! unittest测试模式一共分为两种:unittest.TestCase 单个功能测试/ 适用于测试一个代码程序的文件unittest.TestSuite 一组 阅读全文

posted @ 2020-11-09 17:06 yandyand 阅读(163) 评论(0) 推荐(0)

python的classmethod修饰符

摘要: #:classmethod 修饰符'''classmethod简介:classmethod作用在类中的含义是,类在执行使用的过程中不需要实例化,也就是不需要"self",但是在使用类时必须使用自身类为开头(class.method)这样调用类方法'''class day: @classmethod 阅读全文

posted @ 2020-11-09 01:34 yandyand 阅读(110) 评论(0) 推荐(0)