Checking your account

You can read the lesson while its saved answers and constructions load. Learning controls will open once that work is ready.

Testing Python Functions

Python unittest and xUnit Testing

BOTIE

Repeated manual checks become difficult to keep consistent as a program changes. Kent Beck's Smalltalk testing framework organized checks around preparation, an action and an expected result. That approach influenced other testing frameworks.

Python's unittest documentation identifies its connection to JUnit. A runner can execute a collection of tests and report failures separately. We use that organization to preserve the alert rule while its implementation changes. Passing a finite case set remains evidence about those cases, rather than proof about every possible input.

Sources for this history