How many tests of sample_module.py shown below, are successfully passed, when run with unittest?

Questions & AnswersCategory: Programming LanguageHow many tests of sample_module.py shown below, are successfully passed, when run with unittest?
Adam asked 3 years ago

How many tests of sample_module.py shown below, are successfully passed, when run with unittest?

import unittest

class SampleTestClass(unittest.TestCase):

    def test_sample1(self):

        self.assertRaises(TypeError, pow, 2, '4')

    def test_sample2(self):

        self.assertRaises(Exception, max, [7, 8, '4'])

    def test_sample3(self):

        self.assertRaises(TypeError, int, 'hello')

a. 0
b. 3
c. 1
d. 2