unittest装饰器:只执行一次方法

@classmethod
    def setUpClass(cls):
        print "start!"
   

    @classmethod
    def tearDownClass(cls):
        time.sleep(1)
        print "end!"

posted @ 2019-09-26 17:57  千年妖狐  阅读(481)  评论(0编辑  收藏  举报