Now when 4 is compared to 7 an AssertionError is raised but the value of the counter is not updated. Thus, every next test case will be compared to 7 and every test will fail, until a test_case with value 7 is reached. Then the counter will be updated, but every new case will now be compared to 5. This is a critical error when someone is trying to test lists of items.
test_cases = [1, 2, 3, 4, 5, 6, 7, 8, 9] snapshots = [1, 2, 3, 7, 5, 6, 7, 8, 9]
Now when 4 is compared to 7 an AssertionError is raised but the value of the counter is not updated. Thus, every next test case will be compared to 7 and every test will fail, until a test_case with value 7 is reached. Then the counter will be updated, but every new case will now be compared to 5. This is a critical error when someone is trying to test lists of items.