django-nose

1.4.7 · maintenance · verified Thu Apr 16

django-nose is a Django test runner that integrates the capabilities of the Nose testing framework into Django's test suite. It provides features like testing only specified apps, running specific test modules/classes/tests, simplifying test discovery by obviating the need for `tests/__init__.py`, and leveraging Nose's plugin ecosystem. Additionally, it offers optional performance enhancements such as fixture bundling, reuse of test databases, and hygienic TransactionTestCases. The library is currently in maintenance mode (version 1.4.7) and was last updated in 2020. For new projects, the maintainers recommend considering `pytest` or `unittest` with Django's native testing framework.

Common errors

Warnings

Install

Imports

Quickstart

To quickly integrate `django-nose`, add `django_nose` to your `INSTALLED_APPS` and set `TEST_RUNNER` in your Django `settings.py` file. You can then run tests using `python manage.py test`. Additional Nose arguments can be specified via the `NOSE_ARGS` setting.

import os

# settings.py

INSTALLED_APPS = [
    # ... other apps
    'django_nose',
    # ... your project apps
]

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

# Optional: Configure Nose arguments (example with coverage)
NOSE_ARGS = [
    '--with-coverage',
    '--cover-package=your_app_name',
    '--cover-html-dir=coverage_report'
]

# Run tests from your project root:
# python manage.py test
# Or with specific app:
# python manage.py test your_app_name

view raw JSON →