This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Installation

$ pip install nose-test-sets

Usage

To define your set of common tests, create a TestSetBuilder, and use add_test to add tests. Each test should accept the same name of arguments. Say you define some tests for an adder in the module adder_test_set:

from nose_test_sets import TestSetBuilder

test_set_builder = TestSetBuilder()
test = test_set_builder.add_test

@test
def adding_zero_to_zero_returns_zero(adder):
    assert adder.add(0, 0) == 0

@test
def adding_one_to_two_returns_three(adder):
    assert adder.add(1, 2) == 3

create = test_set_builder.create

To run the tests against a specific implementation, you create a set of tests using the create function that we defined above:

import adder_test_set

def _run_test_with_standard_adder(test_func):
    adder = StandardAdder()
    return test_func(adder)

StandardAdderTests = adder_test_set.create(
    "StandardAdderTests",
    _run_test_with_standard_adder
)

The first argument to create should be the name of the concrete test set. The second argument is a function that can run each of the test functions. In the example above, to run the tests in StandardAdderTests, nose-test-sets ends up calling _run_test_with_standard_adder(adding_zero_to_zero_returns_zero) and _run_test_with_standard_adder(adding_one_to_two_returns_three).

Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nose-test-sets-0.2.1.tar.gz (1.4 kB) Copy SHA256 Checksum SHA256 Source Feb 17, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting