Skip to main content

install nosetests and plugins to ease bdd unit specs

Project description


Use nosetests and plugins to take BDD specifications easier.


The easiest way to install specloud is using pip and requirements file::

$ pip install --no-deps specloud -r

Or you can try finding dependencies by yourself and installing specloud without
requirements file.


Get a python file with BDD-style test names (starting with it, ensure, should,
must) and add them to the test suite

For example::

$ cat

import unittest

class CalculatorSpec(unittest.TestCase):

def it_should_sum_integers(self):
# ...

def should_not_divide_by_zero(self):
# ...

def must_accept_floats(self):
# ...

def ensure_it_work_with_fractions(self):
# ...

def test_subtract_positive_from_negative_numbers(self):
# ...

The command line tool `specloud` colorizes **green** for tests with no failures
and no errors and **red** for tests with failures and/or errors::

$ specloud

Calculator spec
- ensure it work with fractions
- it should sum integers
- must accept floats
- should not divide by zero
- subtract positive from negative numbers

Ran 5 tests in 0.003s


How It Works

SpecLoud is a python package that install `nose`, `pinocchio` and `figleaf`
packages, so it can call `nosetests` with `pinocchio` and `figleaf` plugins.
`nosetests` is called with some default options to find test methods and
`pinocchio` to show pretty and colored messages. `figleaf` is just `pinocchio`

A call to::

$ specloud FILE

is the same doing::

$ nosetests FILE -i '^(it|ensure|must|should)' --with-spec --spec-color

Old Name

The project was born as a proof of concept and I named it firstly `pyunitbdd`.
But that's a terrible name. So I renamed the project to `specloud`.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

specloud-0.3.tar.gz (3.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page