import unittest class TestDemo(unittest.TestCase): def test_one(self): ''' 哈哈 :return: ''' assert 1 == 1 def test_two(self): ''' 呵呵 :return: ''' assert 'H' in 'Hello!' def test_tre(self): assert 5 == 10, '断言失败' TestDemo.test_tre.__doc__ = "测试吖"