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
命令執(zhí)行居然是這樣的結(jié)果
而如果繼承自unittest.TestCase
就沒有這個問題。為什么?
歡迎選擇我的課程,讓我們一起見證您的進(jìn)步~~
The official document says this:
A test class is a class defined in a test module that matches testMatch or is a subclass of unittest.TestCase.