Skip to content

Commit 4791842

Browse files
committed
📝 Expand the Mock section and include spies
1 parent a6dc6d6 commit 4791842

13 files changed

Lines changed: 553 additions & 489 deletions

File tree

‎docs/appendix/glossary.rst‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ Glossary
684684

685685
:doc:`/test/unittest`
686686
supports you in the automation of tests.
687-
:doc:`/test/mock`
687+
:doc:`/test/mock/index`
688688
allows you to create and use :term:`Mock` objects.
689689
:doc:`../document/doctest`
690690
allows you to test tests written in Python :term:`docstrings
@@ -738,9 +738,10 @@ Glossary
738738
result, but also to check **how** the result was achieved or whether the
739739
correct methods were called.
740740

741-
The Python library for mocks is :doc:`unittest.mock <../test/mock>`. It
742-
is also supported by :doc:`../test/pytest/index`. Alternatively, however,
743-
you can also use `pytest-mock <https://pypi.org/project/pytest-mock/>`_.
741+
The Python library for mocks is :doc:`unittest.mock
742+
<../test/mock/index>`. It is also supported by
743+
:doc:`../test/pytest/index`. Alternatively, however, you can also use
744+
`pytest-mock <https://pypi.org/project/pytest-mock/>`_.
744745

745746
.. seealso::
746747
* `Mock object <https://en.wikipedia.org/wiki/Mock_object>`_

‎docs/test/index.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Basically, a distinction is made between static and dynamic test procedures.
1818
unittest
1919
pytest/index
2020
tox
21-
mock
21+
mock/index
2222
hypothesis
2323
tdd
2424
bdd

0 commit comments

Comments
 (0)