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

A nose plugin, enabled by default, which executes a user-defined initialization function prior to nose collecting or running any tests. The user specifies the python module that contains the initialization function, main, in an environment variable.

Use one of two environment variables to specify the module:

NOSE_INIT_MODULE=app.tests.nose_init
NOSE_INIT_PATH=/path/to/my/app/tests/nose_init.py

Then, run your nose tests as usual.

Example initialization module

Let’s assume that we’ve named our initialization module nose_init.py and saved it in /path/to/my/app/tests/nose_init.py. That file must contain a main function. For example:

"""
Initialization script which is imported when ``nosetests`` is run.
The main function will be executed before any other application code
is imported.
"""

def main():
    """nose_easy_init will call this before each ``nosetests`` run."""

    setup_my_test_environment()
    setup_my_test_database()
    etc()

Then, before running nosetests, set one of two environment variables to specify the module:

NOSE_INIT_MODULE=app.tests.nose_init
NOSE_INIT_PATH=/path/to/my/app/tests/nose_init.py

Note that if both the environment variables are defined, the filesystem path, NOSE_INIT_PATH, will take precedence over NOSE_INIT_MODULE.

Release History

Release History

1.0.2

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

1.0.1

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

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-easy-init-1.0.2.tar.gz (1.9 kB) Copy SHA256 Checksum SHA256 Source Feb 12, 2014

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