django-nose¶
django-nose provides all the goodness of nose in your Django tests, like:
- Testing just your apps by default, not all the standard ones that happen to
be in
INSTALLED_APPS
- Running the tests in one or more specific modules (or apps, or classes, or folders, or just running a specific test)
- Obviating the need to import all your tests into
tests/__init__.py
. This not only saves busy-work but also eliminates the possibility of accidentally shadowing test classes. - Taking advantage of all the useful nose plugins
It also provides:
- Fixture bundling, an optional feature which speeds up your fixture-based tests by a factor of 4
- Reuse of previously created test DBs, cutting 10 seconds off startup time
- Hygienic TransactionTestCases, which can save you a DB flush per test
- Support for various databases. Tested with MySQL, PostgreSQL, and SQLite. Others should work as well.
django-nose requires nose 1.2.1 or later, and the latest release is recommended. It follows the Django’s support policy, supporting:
- Django 1.8 (LTS) with Python 2.7, 3.4, or 3.5
- Django 1.9 with Python 2.7, 3.4, or 3.5
- Django 1.10 with Python 2.7, 3.4, or 3.5
- Django 1.11 (LTS) with Python 2.7, 3.4, 3.5, or 3.6
- Django 2.0 with Python 3.4, 3.5, 3.6, or 3.7
- Django 2.1 with Python 3.5, 3.6, or 3.7
Installation¶
You can get django-nose from PyPI with… :
$ pip install django-nose
The development version can be installed with… :
$ pip install -e git://github.com/jazzband/django-nose.git#egg=django-nose
Since django-nose extends Django’s built-in test command, you should add it to
your INSTALLED_APPS
in settings.py
:
INSTALLED_APPS = (
...
'django_nose',
...
)
Then set TEST_RUNNER
in settings.py
:
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
Development¶
Code: | https://github.com/jazzband/django-nose |
---|---|
Issues: | https://github.com/jazzband/django-nose/issues?state=open |
Docs: | https://django-nose.readthedocs.io |
Contents¶
- Installation
- Usage
- Upgrading Django
- Contributing
- Credits
- Changelog
- 1.4.6 (2018-10-03)
- 1.4.5 (2017-08-22)
- 1.4.4 (2016-06-27)
- 1.4.3 (2015-12-28)
- 1.4.2 (2015-10-07)
- 1.4.1 (2015-06-29)
- 1.4 (2015-04-23)
- 1.3 (2014-12-05)
- 1.2 (2013-07-23)
- 1.1 (2012-05-19)
- 1.0 (2012-03-12)
- 0.1.3 (2010-04-15)
- 0.1.2 (2010-08-14)
- 0.1.1 (2010-06-01)
- 0.1 (2010-05-18)
- 0.0.3 (2009-12-31)
- 0.0.2 (2009-10-01)
- 0.0.1 (2009-10-01)