+1 vote
in Python by

Q. 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')

3

1

2

Related questions

+1 vote
asked Jul 16, 2020 in Python by GeorgeBell
0 votes
asked Jul 10, 2020 in Python by GeorgeBell
...