首页 > 继承自nose.case.Test的测试样例类的测试方法无法被nosetests执行是怎么回事?

继承自nose.case.Test的测试样例类的测试方法无法被nosetests执行是怎么回事?

import nose.case
from nose.tools import assert_equal

class TestTest(nose.case.Test):

    def test_hehe(self):
        assert_equal(1, 1)

    pass

就是这样的代码,用nosetests test.py命令执行居然是这样的结果

而如果继承自unittest.TestCase就没有这个问题。为什么?


官方文档这样说滴:

A test class is a class defined in a test module that matches testMatch or is a subclass of unittest.TestCase. 
【热门文章】
【热门文章】