Skip to content

[Docs] Make Quick Start section easier to read #452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 36 additions & 20 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ for testing `Django`_ applications and projects.
Quick Start
===========

1. ``pip install pytest-django``
2. Make sure ``DJANGO_SETTINGS_MODULE`` is defined and and run tests with the ``pytest`` command.
3. (Optional) If you want tests of Django's default application layout be discovered (``tests.py``),
if you put your tests under a ``tests/`` directory , or your files are not named ``test_FOO.py``,
see the FAQ at :ref:`faq-tests-not-being-picked-up`.
.. code-block:: bash

Table of Contents
=================
$ pip install pytest-django

.. toctree::
:maxdepth: 3
Make sure ``DJANGO_SETTINGS_MODULE`` is defined (see
:ref:`configuring_django_settings`) and make your tests discoverable
(see :ref:`faq-tests-not-being-picked-up`):

tutorial
configuring_django
managing_python_path
usage
database
helpers
faq
contributing
changelog
.. code-block:: ini

# -- FILE: pytest.ini (or tox.ini)
[pytest]
DJANGO_SETTINGS_MODULE = test_settings
# -- recommended but optional:
python_files = tests.py test_*.py *_tests.py

Run your tests with ``pytest``:

.. code-block:: bash

$ pytest

Why would I use this instead of Django's manage.py test command?
================================================================
Expand All @@ -50,14 +50,30 @@ See the `pytest documentation`_ for more information on pytest.
.. _Manage test dependencies with fixtures: http://docs.pytest.org/en/latest/fixture.html
.. _pytest documentation: http://docs.pytest.org/

Bugs? Feature suggestions?
Bugs? Feature Suggestions?
==========================

Report issues and feature requests at the `GitHub issue tracker`_.

.. _GitHub issue tracker: http://github.com/pytest-dev/pytest-django/issues

Indices and tables
Table of Contents
=================

.. toctree::
:maxdepth: 3

tutorial
configuring_django
managing_python_path
usage
database
helpers
faq
contributing
changelog

Indices and Tables
==================

* :ref:`genindex`
Expand Down