Skip to content

Commit 9fce0bd

Browse files
author
boris
committed
remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block")
1 parent 5f95dce commit 9fce0bd

23 files changed

+95
-95
lines changed

doc/en/builtin.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
162162
163163
no tests ran in 0.12 seconds
164164
165-
You can also interactively ask for help, e.g. by typing on the Python interactive prompt something like::
165+
You can also interactively ask for help, e.g. by typing on the Python interactive prompt something like
166166

167167
.. code-block:: python
168168

doc/en/cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Other plugins may access the `config.cache`_ object to set/get
3333
Rerunning only failures or failures first
3434
-----------------------------------------------
3535

36-
First, let's create 50 test invocation of which only 2 fail::
36+
First, let's create 50 test invocation of which only 2 fail
3737

3838
.. code-block:: python
3939
@@ -186,7 +186,7 @@ The new config.cache object
186186
Plugins or conftest.py support code can get a cached value using the
187187
pytest ``config`` object. Here is a basic example plugin which
188188
implements a :ref:`fixture` which re-uses previously created state
189-
across pytest invocations::
189+
across pytest invocations
190190

191191
.. code-block:: python
192192

doc/en/capture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Using print statements for debugging
4949
---------------------------------------------------
5050

5151
One primary benefit of the default capturing of stdout/stderr output
52-
is that you can use print statements for debugging::
52+
is that you can use print statements for debugging
5353

5454
.. code-block:: python
5555

doc/en/deprecations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ Internal classes accessed through ``Node``
455455
.. versionremoved:: 4.0
456456

457457
Access of ``Module``, ``Function``, ``Class``, ``Instance``, ``File`` and ``Item`` through ``Node`` instances now issue
458-
this warning::
458+
this warning
459459

460460
.. code-block:: text
461461

doc/en/doctest.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ namespace in which your doctests run. It is intended to be used within
191191
your own fixtures to provide the tests that use them with context.
192192

193193
``doctest_namespace`` is a standard ``dict`` object into which you
194-
place the objects you want to appear in the doctest namespace::
194+
place the objects you want to appear in the doctest namespace
195195

196196
.. code-block:: python
197197
@@ -203,7 +203,7 @@ place the objects you want to appear in the doctest namespace::
203203
def add_np(doctest_namespace):
204204
doctest_namespace["np"] = numpy
205205
206-
which can then be used in your doctests directly::
206+
which can then be used in your doctests directly
207207

208208
.. code-block:: python
209209
@@ -225,7 +225,7 @@ Skipping tests dynamically
225225

226226
.. versionadded:: 4.4
227227

228-
You can use ``pytest.skip`` to dynamically skip doctests. For example::
228+
You can use ``pytest.skip`` to dynamically skip doctests. For example
229229

230230
.. code-block:: text
231231

doc/en/example/parametrize.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Generating parameters combinations, depending on command line
1919
2020
Let's say we want to execute a test with different computation
2121
parameters and the parameter range shall be determined by a command
22-
line argument. Let's first write a simple (do-nothing) computation test::
22+
line argument. Let's first write a simple (do-nothing) computation test
2323

2424
.. code-block:: python
2525
@@ -29,7 +29,7 @@ line argument. Let's first write a simple (do-nothing) computation test::
2929
def test_compute(param1):
3030
assert param1 < 4
3131
32-
Now we add a test configuration like this::
32+
Now we add a test configuration like this
3333

3434
.. code-block:: python
3535
@@ -89,7 +89,7 @@ Running pytest with ``--collect-only`` will show the generated IDs.
8989

9090
Numbers, strings, booleans and None will have their usual string representation
9191
used in the test ID. For other objects, pytest will make a string based on
92-
the argument name::
92+
the argument name
9393

9494
.. code-block:: python
9595
@@ -185,7 +185,7 @@ A quick port of "testscenarios"
185185
Here is a quick port to run tests configured with `test scenarios`_,
186186
an add-on from Robert Collins for the standard unittest framework. We
187187
only have to work a bit to construct the correct arguments for pytest's
188-
:py:func:`Metafunc.parametrize`::
188+
:py:func:`Metafunc.parametrize`
189189

190190
.. code-block:: python
191191
@@ -263,7 +263,7 @@ The parametrization of test functions happens at collection
263263
time. It is a good idea to setup expensive resources like DB
264264
connections or subprocess only when the actual test is run.
265265
Here is a simple example how you can achieve that, first
266-
the actual test requiring a ``db`` object::
266+
the actual test requiring a ``db`` object
267267

268268
.. code-block:: python
269269
@@ -279,7 +279,7 @@ the actual test requiring a ``db`` object::
279279
280280
We can now add a test configuration that generates two invocations of
281281
the ``test_db_initialized`` function and also implements a factory that
282-
creates a database object for the actual test invocations::
282+
creates a database object for the actual test invocations
283283

284284
.. code-block:: python
285285
@@ -357,7 +357,7 @@ parameter on particular arguments. It can be done by passing list or tuple of
357357
arguments' names to ``indirect``. In the example below there is a function ``test_indirect`` which uses
358358
two fixtures: ``x`` and ``y``. Here we give to indirect the list, which contains the name of the
359359
fixture ``x``. The indirect parameter will be applied to this argument only, and the value ``a``
360-
will be passed to respective fixture function::
360+
will be passed to respective fixture function
361361

362362
.. code-block:: python
363363
@@ -406,7 +406,7 @@ Parametrizing test methods through per-class configuration
406406

407407
Here is an example ``pytest_generate_tests`` function implementing a
408408
parametrization scheme similar to Michael Foord's `unittest
409-
parametrizer`_ but in a lot less code::
409+
parametrizer`_ but in a lot less code
410410

411411
.. code-block:: python
412412
@@ -488,7 +488,7 @@ If you want to compare the outcomes of several implementations of a given
488488
API, you can write test functions that receive the already imported implementations
489489
and get skipped in case the implementation is not importable/available. Let's
490490
say we have a "base" implementation and the other (possibly optimized ones)
491-
need to provide similar results::
491+
need to provide similar results
492492

493493
.. code-block:: python
494494
@@ -506,23 +506,23 @@ need to provide similar results::
506506
def optmod(request):
507507
return pytest.importorskip(request.param)
508508
509-
And then a base implementation of a simple function::
509+
And then a base implementation of a simple function
510510

511511
.. code-block:: python
512512
513513
# content of base.py
514514
def func1():
515515
return 1
516516
517-
And an optimized version::
517+
And an optimized version
518518

519519
.. code-block:: python
520520
521521
# content of opt1.py
522522
def func1():
523523
return 1.0001
524524
525-
And finally a little test module::
525+
And finally a little test module
526526

527527
.. code-block:: python
528528
@@ -631,7 +631,7 @@ Use :func:`pytest.raises` with the
631631
in which some tests raise exceptions and others do not.
632632

633633
It is helpful to define a no-op context manager ``does_not_raise`` to serve
634-
as a complement to ``raises``. For example::
634+
as a complement to ``raises``. For example
635635

636636
.. code-block:: python
637637
@@ -662,19 +662,19 @@ In the example above, the first three test cases should run unexceptionally,
662662
while the fourth should raise ``ZeroDivisionError``.
663663

664664
If you're only supporting Python 3.7+, you can simply use ``nullcontext``
665-
to define ``does_not_raise``::
665+
to define ``does_not_raise``
666666

667667
.. code-block:: python
668668
669669
from contextlib import nullcontext as does_not_raise
670670
671-
Or, if you're supporting Python 3.3+ you can use::
671+
Or, if you're supporting Python 3.3+ you can use
672672

673673
.. code-block:: python
674674
675675
from contextlib import ExitStack as does_not_raise
676676
677-
Or, if desired, you can ``pip install contextlib2`` and use::
677+
Or, if desired, you can ``pip install contextlib2`` and use
678678

679679
.. code-block:: python
680680

doc/en/example/pythoncollection.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Here is an example:
131131
132132
This would make ``pytest`` look for tests in files that match the ``check_*
133133
.py`` glob-pattern, ``Check`` prefixes in classes, and functions and methods
134-
that match ``*_check``. For example, if we have::
134+
that match ``*_check``. For example, if we have
135135

136136
.. code-block:: python
137137
@@ -241,7 +241,7 @@ You can easily instruct ``pytest`` to discover tests from every Python file:
241241
However, many projects will have a ``setup.py`` which they don't want to be
242242
imported. Moreover, there may files only importable by a specific python
243243
version. For such cases you can dynamically define files to be ignored by
244-
listing them in a ``conftest.py`` file::
244+
listing them in a ``conftest.py`` file
245245

246246
.. code-block:: python
247247
@@ -252,7 +252,7 @@ listing them in a ``conftest.py`` file::
252252
if sys.version_info[0] > 2:
253253
collect_ignore.append("pkg/module_py2.py")
254254
255-
and then if you have a module file like this::
255+
and then if you have a module file like this
256256

257257
.. code-block:: python
258258
@@ -263,7 +263,7 @@ and then if you have a module file like this::
263263
except Exception, e:
264264
pass
265265
266-
and a ``setup.py`` dummy file like this::
266+
and a ``setup.py`` dummy file like this
267267

268268
.. code-block:: python
269269
@@ -304,7 +304,7 @@ patterns to ``collect_ignore_glob``.
304304

305305
The following example ``conftest.py`` ignores the file ``setup.py`` and in
306306
addition all files that end with ``*_py2.py`` when executed with a Python 3
307-
interpreter::
307+
interpreter
308308

309309
.. code-block:: python
310310

doc/en/example/special.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A session-scoped fixture effectively has access to all
55
collected test items. Here is an example of a fixture
66
function which walks all collected tests and looks
77
if their test class defines a ``callme`` method and
8-
calls it::
8+
calls it
99

1010
.. code-block:: python
1111
@@ -27,7 +27,7 @@ calls it::
2727
seen.add(cls)
2828
2929
test classes may now define a ``callme`` method which
30-
will be called ahead of running any tests::
30+
will be called ahead of running any tests
3131

3232
.. code-block:: python
3333

doc/en/existingtestsuite.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Running an existing test suite with pytest
1515
Say you want to contribute to an existing repository somewhere.
1616
After pulling the code into your development space using some
1717
flavor of version control and (optionally) setting up a virtualenv
18-
you will want to run::
18+
you will want to run
1919

2020
.. code-block:: bash
2121

0 commit comments

Comments
 (0)