How wrapture's timeline and tape record what real code did, and how to filter, assert on and walk that record. Worked through on a resource leak that no return value reveals.

wrapture is a new Python package for monkey patching, testing and tracing built on wrapt, written by an AI under my direction. What it does, why I built it, and what happens next.

The same unit tests written with unittest.mock and with wrapture, focusing on the cases where wrapping the real code rather than replacing it changes what a test can say.

How wrapture's timeline and tape record what real code did, and how to filter, assert on and walk that record. Worked through on a resource leak that no return value reveals.