Skip to main content

nose-easy-init

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.

Metadata

Release files for nose-easy-init 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nose-easy-init 1.0.2
File Size Uploaded Provenance Actions
nose-easy-init-1.0.2.tar.gz 1.9 kB Without provenance Details for nose-easy-init-1.0.2.tar.gz

Release files / nose-easy-init-1.0.2.tar.gz

Download URL nose-easy-init-1.0.2.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fbc8496b21e12f086a55c527c3c1db443dbf55fb257214e8a33affad7dea7f83
BLAKE2b-256 checksum
How to use checksums
0347334097e15695aa1f2dda8847b39c08037b675163d464f2ee6c7f652367f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for nose-easy-init 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page