Skip to content

Pup

Don’t just test it.
Prove it.

Pup turns your unit tests into proven guarantees.
Never miss an edge case again.

Meet Supertests.

A unit test checks examples. A Supertest states what must hold for every input in scope.

tests/supertests.py PYTHON MODE
1 from schematic import *
55 @supertest
56 def reversing_twice_restores_text(text: str):
57 backward = reverse(text)
58 forward = reverse(backward)
59 assert forward == text
  1. 1
    Declare a Supertest

    Adding @supertest turns a regular test into a Supertest.

  2. 2
    Inputs represent every possible case

    The input text covers every possible string, not just a few examples.

  3. 3
    Assert as usual

    Assert or throw an exception just as you would in a regular unit test. Pup handles the rest.

See Pup at work

From Supertest to certainty.

Pup checks every possible input.
If a Supertest fails, you know exactly why.

Pup
text-toolsmain

Pup 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

One behavior is stronger than hundreds of examples.

In our open-source study, 156 related tests became seven Supertests. Distinct regressions stayed as tests.

Demonstration on open-source code indexmap 2.14.0 / Rust
Before
3,268lines
After
1,355lines
156test families
7 stronger Supertests 26 test families retained

Proof on demand

Need certainty? Ask Pup to prove it.

With --prove, Pup establishes the claim for the exact commit and scope shown in the result.

How mathematical verification works

Software assurance for critical code

Make critical behavior impossible to miss.

Get started with Pup
Also from SchematicTurn written rules into guarantees with Quill. Explore Quill