Skip to content

zacstewart/pyspec

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PySpec

Build Status

Documentation

Express expected outcomes with examples.

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'))

Try it out

git clone git@github.com:zacstewart/pyspec.git
cd pyspec
python setup.py install
pyspec example_specs/
F.F.E.F.

3 failures, 1 errors

pyspec.core <class 'pyspec.core.BrokenFizzBuzz'> .convert 15 returns fizzbuzz
Expected fizz to be equal to fizzbuzz

pyspec.core <class 'pyspec.core.BrokenFizzBuzz'> .convert 5 returns buzz
Expected 5 to be equal to buzz

pyspec.core normal assertions are treated as failures and not errors
False wasn't True!

pyspec.core <class 'pyspec.core.BrokenFizzBuzz'> .floop does not exist
'BrokenFizzBuzz' object has no attribute 'floop'

About

Behavior-driven development library for Python in the spirit of RSpec

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages