PySpec

PySpec is a behavior-driven development library in the spirit of RSpec. It enables you to test your code by specifying expected outcomes in prose-like language:

mug = Mug()
with description(Mug):
    with description('.fill')
        with context('coffee'):
            with specification('fills the mug with coffee'):
                mug.fill('coffee')
                expect(mug.contents).to(eq('coffee'))

Indices and tables

Table Of Contents

Next topic

Expectations

This Page