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命令执行居然是这样的结果
nosetests test.py
而如果继承自unittest.TestCase就没有这个问题。为什么?
unittest.TestCase
欢迎选择我的课程,让我们一起见证您的进步~~
Le document officiel dit ceci :
A test class is a class defined in a test module that matches testMatch or is a subclass of unittest.TestCase.
Le document officiel dit ceci :