【发布时间】:2012-06-19 04:38:08
【问题描述】:
这是我的代码:
class MyTestCase(Base):
def setUp(self):
#some code here
def test_B(self):
#some code here
def test_C(self):
#some code here
def test_A(self):
#some code here
def tearDown(self):
#some code here
if __name__ == "__main__":
unittest.main()
我的问题是我所有的测试都是按字母顺序执行的,即首先执行 test_A,然后是 test_B,然后是 test_C。我希望它按照我写的顺序执行,即 test_B -> test_C -> test_A。
如何更改测试的执行顺序?
【问题讨论】: