Skip to main content

A nose plugin that supports writing describe/it styleunit tests with nested contexts

Project description

A nose plugin for describe/it syntax

Installing it

$ pip install describe-it

Writing a test

Any module that ends with ‘spec’ is considered to contain specifications/tests for describe_it.

$ vim myfirst_spec.py

…and the content:

from game import Game
from describe_it import describe, it, before_each, Fixture

@describe
def a_game():
    f = Fixture()

    @before_each
    def setup():
        f.game = Game()

    @it
    def is_player_ones_turn():
        assert f.game.current_player == 1

    @describe
    def in_second_round():

        @before_each
        def setup():
            f.game.play_round()

        @it
        def is_player_twos_turn():
            assert f.game.current_player == 2

Running tests

$ nosetests --with-describe-it

Project details


Release history Release notifications

History Node

2.2.2

History Node

2.2.1

History Node

2.2.0

History Node

2.1.0

History Node

2.0.0

History Node

1.1.0

History Node

1.0.0

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

This version
History Node

0.1.5

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
describe_it-0.1.5.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None Jul 15, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page