Complete the code to define a test suite using unittest in Python.
import unittest class MyTests(unittest.[1]): def test_example(self): self.assertEqual(1 + 1, 2)
The TestCase class is used to create individual test cases in unittest.
Complete the code to add a test case to a test suite.
suite = unittest.TestSuite() suite.addTest(MyTests('[1]'))
The method name test_example is the test method to add to the suite.
Fix the error in the code to run the test suite using unittest.
runner = unittest.TextTestRunner()
runner.[1](suite)The correct method to run a test suite is run.
Fill both blanks to create a test suite from multiple test cases.
loader = unittest.TestLoader()
suite = unittest.TestSuite([
loader.[1](MyTests),
loader.[2](OtherTests)
])The makeSuite method creates a suite from a TestCase class.
Fill all three blanks to filter and run tests with unittest.
loader = unittest.TestLoader() suite = loader.[1]('test_example') runner = unittest.TextTestRunner() runner.[2](suite) # To run only tests matching a pattern, use [3] method.
loadTestsFromName loads tests by name, run executes the suite, and discover finds tests matching a pattern.
