@@ -11,27 +11,27 @@ for testing `Django`_ applications and projects.
1111Quick Start
1212===========
1313
14- 1. ``pip install pytest-django ``
15- 2. Make sure ``DJANGO_SETTINGS_MODULE `` is defined and and run tests with the ``pytest `` command.
16- 3. (Optional) If you want tests of Django's default application layout be discovered (``tests.py ``),
17- if you put your tests under a ``tests/ `` directory , or your files are not named ``test_FOO.py ``,
18- see the FAQ at :ref: `faq-tests-not-being-picked-up `.
14+ .. code-block :: bash
1915
20- Table of Contents
21- =================
16+ $ pip install pytest-django
2217
23- .. toctree ::
24- :maxdepth: 3
18+ Make sure ``DJANGO_SETTINGS_MODULE `` is defined (see
19+ :ref: `configuring_django_settings `) and make your tests discoverable
20+ (see :ref: `faq-tests-not-being-picked-up `):
2521
26- tutorial
27- configuring_django
28- managing_python_path
29- usage
30- database
31- helpers
32- faq
33- contributing
34- changelog
22+ .. code-block :: ini
23+
24+ # -- FILE: pytest.ini (or tox.ini)
25+ [pytest]
26+ DJANGO_SETTINGS_MODULE = test_settings
27+ # -- recommended but optional:
28+ python_files = tests.py test_*.py *_tests.py
29+
30+ Run your tests with ``pytest ``:
31+
32+ .. code-block :: bash
33+
34+ $ pytest
3535
3636 Why would I use this instead of Django's manage.py test command?
3737================================================================
@@ -50,14 +50,30 @@ See the `pytest documentation`_ for more information on pytest.
5050.. _Manage test dependencies with fixtures : http://docs.pytest.org/en/latest/fixture.html
5151.. _pytest documentation : http://docs.pytest.org/
5252
53- Bugs? Feature suggestions ?
53+ Bugs? Feature Suggestions ?
5454==========================
5555
5656Report issues and feature requests at the `GitHub issue tracker `_.
5757
5858.. _GitHub issue tracker : http://github.com/pytest-dev/pytest-django/issues
5959
60- Indices and tables
60+ Table of Contents
61+ =================
62+
63+ .. toctree ::
64+ :maxdepth: 3
65+
66+ tutorial
67+ configuring_django
68+ managing_python_path
69+ usage
70+ database
71+ helpers
72+ faq
73+ contributing
74+ changelog
75+
76+ Indices and Tables
6177==================
6278
6379* :ref: `genindex `
0 commit comments