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.