summaryrefslogtreecommitdiff
path: root/doc/en/unittest.rst
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2018-11-23 21:41:22 -0800
committerAnthony Sottile <asottile@umich.edu>2018-11-23 22:01:30 -0800
commit70158013772e600284e5274c72fb26b02c82a2b9 (patch)
tree6db84696c8ba4a5402a2b85c7aa18bd2113e0a93 /doc/en/unittest.rst
parent860bc5077220cab315b54dfa458b68cee6a18d93 (diff)
downloadpytest-70158013772e600284e5274c72fb26b02c82a2b9.tar.gz
Highlight docs with pygments-pytest
Diffstat (limited to 'doc/en/unittest.rst')
-rw-r--r--doc/en/unittest.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/en/unittest.rst b/doc/en/unittest.rst
index 5a6561d4b..34c8a35db 100644
--- a/doc/en/unittest.rst
+++ b/doc/en/unittest.rst
@@ -122,7 +122,9 @@ fixture definition::
The ``@pytest.mark.usefixtures("db_class")`` class-decorator makes sure that
the pytest fixture function ``db_class`` is called once per class.
Due to the deliberately failing assert statements, we can take a look at
-the ``self.db`` values in the traceback::
+the ``self.db`` values in the traceback:
+
+.. code-block:: pytest
$ pytest test_unittest_db.py
=========================== test session starts ============================
@@ -199,7 +201,9 @@ used for all methods of the class where it is defined. This is a
shortcut for using a ``@pytest.mark.usefixtures("initdir")`` marker
on the class like in the previous example.
-Running this test module ...::
+Running this test module ...:
+
+.. code-block:: pytest
$ pytest -q test_unittest_cleandir.py
. [100%]