Django TestCase testing order

Posted by ziang on Stack Overflow See other posts from Stack Overflow or by ziang
Published on 2010-04-05T20:34:26Z Indexed on 2010/04/05 21:03 UTC
Read the original article Hit count: 413

Filed under:
|
|

If there are several methods in the test class, I found that the order to execute is alphabetical. But I want to customize the order of execution. How to define the execution order?

For example: testTestA will be loaded first than testTestB.

class Test(TestCase):
    def setUp(self):
        ...

    def testTestB(self):
        #test code

    def testTestA(self):
        #test code

© Stack Overflow or respective owner

Related posts about django

Related posts about python