All apps
Tests as a Safety Net
About this app
A discount function with tiers (5 % from €100, 10 % from €500) and six pytest tests. Seven changes are applied, with the old line struck through. The tests run row by row with traffic lights, E lines and a pytest-style summary. Each change drops into the net as a ball: it is caught when a test turns red, otherwise it falls through. Two broken discount tiers slip past green tests until the missing boundary test rabatt(500) == 50 is added. Plus a refactoring that rightly stays green.
Subject: Software engineering
More from Software engineering
- Class Diagram and Code in Sync
- Token Game in Activity Diagrams
- Trust, but Verify
- Waterfall or Agile?
- WIP Limit and Lead Time
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps