Skip to content

Commit 7cb3974

Browse files
committed
doc: restore missing "# content of pytest.toml" regendoc commands
In 147467d I didn't realize they were significant.
1 parent adb3658 commit 7cb3974

File tree

8 files changed

+12
-0
lines changed

8 files changed

+12
-0
lines changed

doc/en/example/markers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ Registering markers for your test suite is simple:
243243

244244
.. code-block:: toml
245245
246+
# content of pytest.toml
246247
[pytest]
247248
markers = ["webtest: mark a test as a webtest.", "slow: mark test as slow."]
248249

doc/en/example/pythoncollection.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ You can set the :confval:`norecursedirs` option in a configuration file:
9494

9595
.. code-block:: toml
9696
97+
# content of pytest.toml
9798
[pytest]
9899
norecursedirs = [".svn", "_build", "tmp*"]
99100
@@ -120,6 +121,7 @@ Here is an example:
120121

121122
.. code-block:: toml
122123
124+
# content of pytest.toml
123125
# Example 1: have pytest look for "check" instead of "test"
124126
[pytest]
125127
python_files = ["check_*.py"]
@@ -175,6 +177,7 @@ You can check for multiple glob patterns by adding a space between the patterns:
175177

176178
.. code-block:: toml
177179
180+
# content of pytest.toml
178181
# Example 2: have pytest look for files with "test" and "example"
179182
[pytest]
180183
python_files = ["test_*.py", "example_*.py"]
@@ -213,6 +216,7 @@ can make this change more permanently:
213216

214217
.. code-block:: toml
215218
219+
# content of pytest.toml
216220
[pytest]
217221
addopts = ["--pyargs"]
218222
@@ -264,6 +268,7 @@ You can easily instruct ``pytest`` to discover tests from every Python file:
264268

265269
.. code-block:: toml
266270
271+
# content of pytest.toml
267272
[pytest]
268273
python_files = ["*.py"]
269274

doc/en/example/simple.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ progress output, you can write it into a configuration file:
1515

1616
.. code-block:: toml
1717
18+
# content of pytest.toml
1819
[pytest]
1920
addopts = ["-ra", "-q"]
2021

doc/en/explanation/goodpractices.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ To this end, add the following to your configuration file:
100100

101101
.. code-block:: toml
102102
103+
# content of pytest.toml
103104
[pytest]
104105
addopts = ["--import-mode=importlib"]
105106

doc/en/how-to/doctest.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ putting them into a configuration file like this:
7474

7575
.. code-block:: toml
7676
77+
# content of pytest.toml
7778
[pytest]
7879
addopts = ["--doctest-modules"]
7980

doc/en/how-to/fixtures.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,7 @@ into a configuration file:
17421742

17431743
.. code-block:: toml
17441744
1745+
# content of pytest.toml
17451746
[pytest]
17461747
usefixtures = ["cleandir"]
17471748

doc/en/how-to/writing_plugins.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ in our configuration file to tell pytest where to look for example files.
426426

427427
.. code-block:: toml
428428
429+
# content of pytest.toml
429430
[pytest]
430431
pytester_example_dir = "."
431432

doc/en/reference/reference.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,7 @@ passed multiple times. The expected format is ``name=value``. For example::
13371337

13381338
.. code-block:: toml
13391339
1340+
# content of pytest.toml
13401341
[pytest]
13411342
addopts = ["--maxfail=2", "-rf"] # exit after 2 failures, report fail info
13421343

0 commit comments

Comments
 (0)