python-specfor 0.1.0

A Framework for Behavior Driven Development(BDD) based on stdlib's unittest

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
LGPL (GNU Lesser General Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
bellbind
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Programming \ Quality Assurance and Testing
python-specfor is inspired from Ruby's RSpec. Spec definition is based on Python decorator description.

Spec Example

# spec_sum.py
from specfor import the, spec

empty_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 = [2, 3, 5, 7, 11]
 its.sum = 28

@empty_list.that("sum")
@int_list.that("sum")
def sum_spec(its):
 result = sum(its.list)
 the[result].should == its.sum

spec.publish(globals())

Last updated on August 7th, 2010

feature list requirements

#unit testing #Behavior Driven Development #unit #testing #BDD #Python

Add your review!

SUBMIT