Complete the code to import the unittest module correctly.
import [1]
The unittest module is the built-in Python testing framework. To use it, you import unittest.
Complete the code to write a simple test function using pytest.
def test_addition(): assert 1 + 1 == [1]
In pytest, test functions start with test_. The assertion checks if 1 + 1 equals 2.
Fix the error in the unittest test case method name to make it run automatically.
import unittest class TestMath(unittest.TestCase): def [1](self): self.assertEqual(2 + 2, 4)
In unittest, test methods must start with test_ to be discovered and run automatically.
Fill both blanks to create a nose test function that asserts True is True.
def [1](): assert [2] is True
Nose test functions should start with test_. The assertion checks if True is True.
Fill all three blanks to write a pytest test that checks if a list contains a value.
def [1](): items = [1, 2, 3] assert [2] in [3]
The test function name starts with test_. The assertion checks if 2 is in the list items.