Complete the code to show what white-box testing focuses on.
def test_function(): # White-box testing examines [1] of the code pass
White-box testing looks inside the code to check the internal logic and structure.
Complete the code to identify a white-box testing technique.
def test_coverage(): # White-box testing uses [1] to check which parts of code run pass
Code coverage measures which lines or branches of code are executed during tests, a white-box technique.
Fix the error in the white-box testing description.
def white_box_test(): '''White-box testing ignores [1] and focuses on outputs.''' pass
White-box testing does not ignore internal code; it focuses on it. It does not focus only on external behavior.
Fill both blanks to complete the white-box testing example.
def test_branch_coverage(): for condition in conditions: if condition [1] True: execute_path = [2] else: execute_path = 'other' return execute_path
Branch coverage tests both true and false paths. The condition should be checked with '==' and the path set accordingly.
Fill all three blanks to complete the white-box testing dictionary comprehension.
coverage = {func[1]: calls for func, calls in call_counts.items() if calls [2] 0 and func.startswith([3])}The code builds a dictionary of functions called more than zero times and whose names start with 'test_'.