File: README.rst

package info (click to toggle)
django-nose 1.4.6-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 404 kB
  • sloc: python: 918; makefile: 207; sh: 160
file content (91 lines) | stat: -rw-r--r-- 2,986 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
===========
django-nose
===========

.. image:: https://img.shields.io/pypi/v/django-nose.svg
    :alt: The PyPI package
    :target: https://pypi.python.org/pypi/django-nose

.. image:: https://img.shields.io/travis/django-nose/django-nose/master.svg
    :alt: TravisCI Build Status
    :target: https://travis-ci.org/django-nose/django-nose

.. image:: https://img.shields.io/coveralls/django-nose/django-nose/master.svg
    :alt: Coveralls Test Coverage
    :target: https://coveralls.io/r/django-nose/django-nose?branch=master

.. Omit badges from docs

**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`_

.. _nose: https://nose.readthedocs.io/en/latest/
.. _nose plugins: http://nose-plugins.jottit.com/

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

.. _latest release: https://pypi.python.org/pypi/nose
.. _Django's support policy: https://docs.djangoproject.com/en/1.8/internals/release-process/#supported-versions

Installation
------------

You can get django-nose from PyPI with... :

.. code-block:: shell

    $ pip install django-nose

The development version can be installed with... :

.. code-block:: shell

    $ pip install -e git://github.com/django-nose/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``:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'django_nose',
        ...
    )

Then set ``TEST_RUNNER`` in ``settings.py``:

.. code-block:: python

    TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

Development
-----------
:Code:   https://github.com/django-nose/django-nose
:Issues: https://github.com/django-nose/django-nose/issues?state=open
:Docs:   https://django-nose.readthedocs.io