Skip to content

Commit 2641761

Browse files
authored
Merge pull request #8441 from evildmp/evolutionary-documentation-restructure
Moved more sections from reference to how-to.
1 parent 63bc49d commit 2641761

17 files changed

+389
-1211
lines changed

doc/en/contents.rst

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,30 @@ How-to guides
2424
:maxdepth: 2
2525

2626
how-to/usage
27-
how-to/existingtestsuite
2827
how-to/assert
28+
how-to/fixtures
2929
how-to/mark
30-
how-to/monkeypatch
30+
how-to/parametrize
3131
how-to/tmpdir
32-
how-to/capture
32+
how-to/monkeypatch
33+
how-to/doctest
34+
how-to/cache
35+
36+
how-to/logging
37+
how-to/capture-stdout-stderr
38+
how-to/capture-warnings
3339
how-to/skipping
34-
how-to/parametrize
40+
3541
how-to/plugins
42+
how-to/writing_plugins
43+
how-to/writing_hook_functions
44+
45+
how-to/existingtestsuite
46+
how-to/unittest
3647
how-to/nose
48+
how-to/xunit_setup
49+
3750
how-to/bash-completion
38-
how-to/fixtures
3951

4052

4153
Reference guides
@@ -45,14 +57,7 @@ Reference guides
4557
:maxdepth: 2
4658

4759
reference/fixtures
48-
reference/warnings
49-
reference/doctest
50-
reference/cache
51-
reference/unittest
52-
reference/xunit_setup
5360
reference/plugin_list
54-
reference/writing_plugins
55-
reference/logging
5661
reference/customize
5762
reference/reference
5863

doc/en/explanation/fixtures.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ About fixtures
66
.. seealso:: :ref:`how-to-fixtures`
77
.. seealso:: :ref:`Fixtures reference <reference-fixtures>`
88

9+
pytest fixtures are designed to be explicit, modular and scalable.
910

1011
What fixtures are
1112
-----------------

doc/en/how-to/assert.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1+
.. _`assert`:
12

23
How to write and report assertions in tests
34
==================================================
45

5-
.. _`assertfeedback`:
66
.. _`assert with the assert statement`:
7-
.. _`assert`:
8-
97

108
Asserting with the ``assert`` statement
119
---------------------------------------------------------
1210

13-
``pytest`` allows you to use the standard python ``assert`` for verifying
11+
``pytest`` allows you to use the standard Python ``assert`` for verifying
1412
expectations and values in Python tests. For example, you can write the
1513
following:
1614

doc/en/reference/cache.rst renamed to doc/en/how-to/cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
.. _cache:
33

44

5-
Cache: working with cross-testrun state
6-
=======================================
5+
How to re-run failed tests and maintain state between test runs
6+
===============================================================
77

88

99

File renamed without changes.

doc/en/reference/warnings.rst renamed to doc/en/how-to/capture-warnings.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _`warnings`:
22

3-
Warnings Capture
4-
================
3+
How to capture warnings
4+
=======================
55

66

77

doc/en/reference/doctest.rst renamed to doc/en/how-to/doctest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _doctest:
22

3-
Doctest integration for modules and test files
3+
How to run doctests
44
=========================================================
55

66
By default, all files matching the ``test*.txt`` pattern will

doc/en/how-to/index.rst

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,58 @@
33
How-to guides
44
================
55

6+
Core pytest functionality
7+
-------------------------
8+
69
.. toctree::
710
:maxdepth: 1
811

912
usage
10-
existingtestsuite
1113
assert
14+
fixtures
1215
mark
13-
monkeypatch
16+
parametrize
1417
tmpdir
15-
capture
18+
monkeypatch
19+
doctest
20+
cache
21+
22+
test output and outcomes
23+
----------------------------
24+
25+
.. toctree::
26+
:maxdepth: 1
27+
28+
logging
29+
capture-stdout-stderr
30+
capture-warnings
1631
skipping
17-
parametrize
32+
33+
Plugins
34+
----------------------------
35+
36+
.. toctree::
37+
:maxdepth: 1
38+
1839
plugins
40+
writing_plugins
41+
writing_hook_functions
42+
43+
pytest and other test systems
44+
-----------------------------
45+
46+
.. toctree::
47+
:maxdepth: 1
48+
49+
existingtestsuite
50+
unittest
1951
nose
52+
xunit_setup
53+
54+
pytest development environment
55+
------------------------------
56+
57+
.. toctree::
58+
:maxdepth: 1
59+
2060
bash-completion
21-
fixtures

doc/en/reference/logging.rst renamed to doc/en/how-to/logging.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
.. _logging:
22

3-
Logging
4-
-------
5-
6-
7-
3+
How to manage logging
4+
---------------------
85

96
pytest captures log messages of level ``WARNING`` or above automatically and displays them in their own section
107
for each failed test in the same manner as captured stdout and stderr.

doc/en/reference/unittest.rst renamed to doc/en/how-to/unittest.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
.. _`unittest.TestCase`:
33
.. _`unittest`:
44

5-
unittest.TestCase Support
6-
=========================
5+
How to use ``unittest``-based tests with pytest
6+
===============================================
77

88
``pytest`` supports running Python ``unittest``-based tests out of the box.
99
It's meant for leveraging existing ``unittest``-based test suites

0 commit comments

Comments
 (0)