from schematic import *@supertestdef reversing_twice_restores_text(text: str): backward = reverse(text) forward = reverse(backward) assert forward == textPup
Pup turns your unit tests into proven guarantees.
Never miss an edge case again.
A unit test checks examples. A Supertest states what must hold for every input in scope.
from schematic import *@supertestdef reversing_twice_restores_text(text: str): backward = reverse(text) forward = reverse(backward) assert forward == textAdding @supertest turns a regular test into a Supertest.
The input text covers every possible string, not just a few examples.
Assert or throw an exception just as you would in a regular unit test. Pup handles the rest.
See Pup at work
Pup checks every possible input.
If a Supertest fails, you know exactly why.
mainPup checks normalizing_twice_changes_nothing, finds that collapse_spaces is not idempotent, returns hello followed by three spaces and world as a counterexample, runs pup fix and shows the source changes, then confirms them with zero problems.
The Supertest advantage
In our open-source study, 156 related tests became seven Supertests. Distinct regressions stayed as tests.
Proof on demand
With --prove, Pup establishes the claim for the exact commit and scope shown
in the result.
$ pup check --prove --waitc24f901Software assurance for critical code