Complete the code to print the test execution result as 'PASS' or 'FAIL'.
result = 'PASS' if tests_passed else [1] print(result)
The code sets result to 'PASS' if tests_passed is True; otherwise, it should be 'FAIL' to indicate test failure.
Complete the code to count how many tests passed from the list of test results.
passed_count = sum(1 for result in test_results if result == [1])
The code counts how many test results are equal to 'PASS', indicating successful tests.
Fix the error in the code that generates a summary report of test results.
summary = f"Total: {total_tests}, Passed: {passed}, Failed: {failed}, [1]: {skipped}"
The label in the summary string should be capitalized as 'Skipped' to match the report style.
Fill both blanks to create a dictionary comprehension that maps test names to their pass/fail status.
test_status = {test[1]: result == 'PASS' for test, result in test_results.items() if result [2] 'SKIP'}The first blank uses .upper() to standardize test names in uppercase. The second blank uses != to exclude skipped tests.
Fill all three blanks to create a filtered report dictionary with test names in lowercase, results, and only passed tests.
filtered_report = {test[1]: result for test, result in report.items() if result [2] 'PASS' and test [3] 'test_1'}The test names are converted to lowercase with .lower(). The filter includes only tests where the result is 'PASS' (==) and excludes the test named 'test_1' (!=).