Which is the expected output of below code, when run using command python -m unittest sample_module.py import unittest class SampleTestClass(unittest.TestCase): def setUpClass(cls): print('Entering Test Class') def tearDownClass(cls): print('Exiting Test Class') def test_sample1(self): self.assertEqual(3*3, 9)

Questions & AnswersCategory: Programming LanguageWhich is the expected output of below code, when run using command python -m unittest sample_module.py import unittest class SampleTestClass(unittest.TestCase): def setUpClass(cls): print('Entering Test Class') def tearDownClass(cls): print('Exiting Test Class') def test_sample1(self): self.assertEqual(3*3, 9)
Adam asked 3 years ago

Which is the expected output of below code, when run using command python -m unittest sample_module.py

import unittest

class SampleTestClass(unittest.TestCase):

    def setUpClass(cls):

        print('Entering Test Class')

    def tearDownClass(cls):

        print('Exiting Test Class')

    def test_sample1(self):

        self.assertEqual(3*3, 9)

a. Entering Test Class
.
Exiting Test Class
b. Entering Test Class
.Exiting Test Class
c. The test run fails.
d. Entering Test Class
Exiting Test Class