Recent Posts

Live tracing with wrapture

The bindings used to test a piece of code are the same objects that trace it. Take away the timeline, register a sink, and a running program narrates itself.

python wrapture tracing

Beyond callables in wrapture

What a wrapture binding can name that is not a call: attribute reads and writes, values held in place for a test, the content of a settings dict, callables in a registry, and generators consumed...

python wrapture testing

Phased behaviour in wrapture

Testing retry logic, circuit breakers and polling loops with wrapture's phases, where a binding's behaviour changes on a count, a condition, an exhausted sequence, or a signal from elsewhere.

python wrapture testing

Recording calls with wrapture

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.

python wrapture testing

Unit testing with wrapture

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.

python wrapture testing

Introducing wrapture

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.

python wrapture testing ai

Stay Updated

Follow my journey and get notified about new posts and projects.

You can also follow this site via RSS feed.

If you're a Python developer, you might also want to check out the RSS feed available from planetpython.org for posts from various Python developers, including myself.

Sponsor Me

Support my open source work and help me continue creating tools that benefit the developer community.

Sponsor on GitHub