小编Bri*_*ill的帖子

在setup()中输出pyunit测试名称的方法

在python中有没有办法让pyunit测试输出它当前正在运行的测试.例:

def setUp(self):
    log.debug("Test %s Started" % (testname))

def test_example(self):
    #do stuff

def test_example2(self):
    #do other stuff

def tearDown(self):
    log.debug("Test %s Finished" % (testname))
Run Code Online (Sandbox Code Playgroud)

python unit-testing python-unittest

45
推荐指数
3
解决办法
2万
查看次数

标签 统计

python ×1

python-unittest ×1

unit-testing ×1