python-specforA Framework for Behavior Driven Development(BDD) based on stdlib's unittest | |
Download |
python-specfor Ranking & Summary
Advertisement
python-specfor Tags
python-specfor Description
A Framework for Behavior Driven Development(BDD) based on stdlib's unittest python-specfor is inspired from Ruby's RSpec. Spec definition is based on Python decorator description.Spec Example# spec_sum.pyfrom specfor import the, specempty_list = spec.of("empty list")int_list = spec.of("int list")@empty_list.before()def prepare(its): its.list = [] its.sum = 0@int_list.before()def prepare(its): its.list = its.sum = 28@empty_list.that("sum")@int_list.that("sum")def sum_spec(its): result = sum(its.list) the.should == its.sumspec.publish(globals())
python-specfor Related Software