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(ValueError, int, 'hello')

Questions & AnswersCategory: Programming LanguageHow 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(ValueError, int, 'hello')
Adam asked 2 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(ValueError, int, 'hello')

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