Retesting everything after a fix
After fixing a bug, rerun the failed test and all earlier tests, because a fix can break code that used to pass.
Understanding Retesting everything after a fix in ACARA Digital Technologies Years 9–10
What it does: The test that failed earlier is run again on the fixed code. If it now prints True, the fix worked. This test passed before the change. After the fix it fails, which shows why every earlier test must be rerun. Code is connected. Changing one line can change how other parts behave, which is why we retest. Regression means going backwards. You check that the program has not slipped back into failing. A previously passing test that now fails is a regression. The fix needs another look. Even a small change like an operator can affect results for other test values.
Common mistakes: After a fix you must rerun the failed test AND all the earlier tests. This list only holds the one test that failed, so the earlier test (0, 0) is never rerun. It should be tests = [(0, 0), (3, 6)]. The slice [:1] keeps only the first test, so the rest are skipped after the fix. The loop should go through every test: for n, e in tests:.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 591–622) and word search (Modules 536–622).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
regression testingFill in the Blanks
Spot the Error
Student with a class code? Join your class →