I want run my tests in order of they are written not in alphabetical order that unittest
does by default.
import unittest
class test2(unittest.TestCase):
def test1(self):
pass
def test0(self):
pass
class test1(unittest.TestCase):
def testB(self):
pass
def testA(self):
pass
In this example I want to set unittest
or nosetests
to run tests in order of test1, test0, testB and testA. When I run tests using command line with python -m unittest -v mytestmodule
OR
nosetests mytestmodule
.
What command line argument should I use in order to do so?