diff options
author | boris <boris@verhovs.ky> | 2019-08-06 16:18:06 -0700 |
---|---|---|
committer | boris <boris@verhovs.ky> | 2019-08-06 16:18:06 -0700 |
commit | 23a0b532dbe72d6cb6ec923d9ce6f0a63a34fc28 (patch) | |
tree | 681fb33747fc5a3be3ff747ccc9978207df69cb7 /doc/en/unittest.rst | |
parent | 9fce0bdd88c425aa7b98dc4cc0c2696c19fdbd95 (diff) | |
download | pytest-23a0b532dbe72d6cb6ec923d9ce6f0a63a34fc28.tar.gz |
Revert "remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block")"
This reverts commit 9fce0bdd88c425aa7b98dc4cc0c2696c19fdbd95.
Diffstat (limited to 'doc/en/unittest.rst')
-rw-r--r-- | doc/en/unittest.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/en/unittest.rst b/doc/en/unittest.rst index af0da0923..e5253af69 100644 --- a/doc/en/unittest.rst +++ b/doc/en/unittest.rst @@ -10,7 +10,7 @@ It's meant for leveraging existing ``unittest``-based test suites to use pytest as a test runner and also allow to incrementally adapt the test suite to take full advantage of pytest's features. -To run an existing ``unittest``-style test suite using ``pytest``, type +To run an existing ``unittest``-style test suite using ``pytest``, type:: .. code-block:: bash @@ -80,7 +80,7 @@ Running your unittest with ``pytest`` allows you to use its tests. Assuming you have at least skimmed the pytest fixture features, let's jump-start into an example that integrates a pytest ``db_class`` fixture, setting up a class-cached database object, and then reference -it from a unittest-style test +it from a unittest-style test:: .. code-block:: python @@ -109,7 +109,7 @@ as the ``cls`` attribute, denoting the class from which the fixture is used. This architecture de-couples fixture writing from actual test code and allows re-use of the fixture by a minimal reference, the fixture name. So let's write an actual ``unittest.TestCase`` class using our -fixture definition +fixture definition:: .. code-block:: python @@ -188,7 +188,7 @@ Let's look at an ``initdir`` fixture which makes all test methods of a ``TestCase`` class execute in a temporary directory with a pre-initialized ``samplefile.ini``. Our ``initdir`` fixture itself uses the pytest builtin :ref:`tmpdir <tmpdir>` fixture to delegate the -creation of a per-test temporary directory +creation of a per-test temporary directory:: .. code-block:: python |