Contexts

Dead simple descriptive testing for Python. No custom decorators, no context managers, no .feature files, no fuss.

About

Contexts is a ‘Context-Specification’-style test framework for Python 3.3 and above, inspired by C#’s Machine.Specifications. It aims to be flexible and extensible, and is appropriate for unit, integration and acceptance testing. Read more at the Huddle Dev Blog.

Test written with Contexts resemble the grammar of Given, When, Then-style specifications. Writing tests which read like user-centric sentences can encourage you to focus on the behaviour, not the implementation, of your code. Contexts takes cues from Behaviour Driven Development, but it aims to be useful for more than just acceptance testing.