You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.rst
+34-18Lines changed: 34 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,24 @@
1
-
Welcome to pytest-django's documentation!
2
-
=========================================
1
+
===========================
2
+
pytest-django Documentation
3
+
===========================
3
4
4
-
pytest-django is a plugin for `pytest <http://pytest.org/>`_ that provides a set of useful tools for testing `Django <http://www.djangoproject.com/>`_ applications and projects.
5
+
pytest-django is a plugin for `pytest`_ that provides a set of useful tools
6
+
for testing `Django`_ applications and projects.
7
+
8
+
.. _pytest: http://pytest.org/
9
+
.. _Django: https://www.djangoproject.com/
10
+
11
+
Quick Start
12
+
===========
13
+
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`.
19
+
20
+
Table of Contents
21
+
=================
5
22
6
23
.. toctree::
7
24
:maxdepth:3
@@ -21,25 +38,24 @@ Why would I use this instead of Django's manage.py test command?
21
38
22
39
Running the test suite with pytest offers some features that are not present in Django's standard test mechanism:
23
40
24
-
* Less boilerplate: no need to import unittest, create a subclass with methods. Just write tests as regular functions.
25
-
* `Manage test dependencies with fixtures<http://pytest.org/latest/fixture.html>`_
26
-
* Database re-use: no need to re-create the test database for every test run.
27
-
* Run tests in multiple processes for increased speed
28
-
* There are a lot of other nice plugins available for pytest.
29
-
* Easy switching: Existing unittest-style tests will still work without any modifications.
41
+
* Less boilerplate: no need to import unittest, create a subclass with methods. Just write tests as regular functions.
42
+
* `Manage test dependencies with fixtures`_.
43
+
* Database re-use: no need to re-create the test database for every test run.
44
+
* Run tests in multiple processes for increased speed.
45
+
* There are a lot of other nice plugins available for pytest.
46
+
* Easy switching: Existing unittest-style tests will still work without any modifications.
30
47
31
-
See the `pytest documentation <http://pytest.org/latest/>`_ for more information on pytest.
32
-
33
-
Quick Start
34
-
===========
35
-
1. ``pip install pytest-django``
36
-
2. Make sure ``DJANGO_SETTINGS_MODULE`` is defined and and run tests with the ``pytest`` command.
37
-
3. (Optionally) If you put your tests under a tests directory (the standard Django application layout), and your files are not named ``test_FOO.py``, see the FAQ :ref:`faq-tests-not-being-picked-up`.
48
+
See the `pytest documentation`_ for more information on pytest.
38
49
50
+
.. _Manage test dependencies with fixtures: http://docs.pytest.org/en/latest/fixture.html
51
+
.. _pytest documentation: http://docs.pytest.org/
39
52
40
53
Bugs? Feature suggestions?
41
-
============================
42
-
Report issues and feature requests at the `github issue tracker <http://github.com/pytest-dev/pytest-django/issues>`_.
54
+
==========================
55
+
56
+
Report issues and feature requests at the `GitHub issue tracker`_.
0 commit comments