MyTestCase 1

MyTestCase

class MyTestCase(TestCase):

    @classmethod
    def setUpClass(cls):
        super().setUpClass()
        ...

    @classmethod
    def tearDownClass(cls):
        ...
        super().tearDownClass()

Here is what the above code is Doing:
1. The setUpClass() method is called before any of the test methods are run.
2. The tearDownClass() method is called after all of the test methods have been run.
3. The setUp() method is called before each test method is run.
4. The tearDown() method is called after each test method is run.

Similar Posts