OhMyBug

tests/ci

Test pins a state nothing produces

rare10 sightingsfirst seen September 2026

What goes wrong

A test builds its input by hand and asserts on it, but no code path can ever create that state. The assertion then holds regardless of the behaviour it names, and the reader relies on the green result as evidence that the inputs real users generate are handled.

Example

A test builds a record with one field left empty and asserts the handler copes, though every writer of that record always fills the field in.

Not to be confused with

Not Fixture never creates the triggering condition, where the state is reachable and the setup simply fails to build it; here the state itself cannot exist outside the test.

Discovered by

Field notes · 8