Skip to content
Prev Previous commit
Next Next commit
Fix doctest
  • Loading branch information
zooba committed Feb 26, 2020
commit 84c21d064f34c36f7ca746368e8e21e8d6497c50
16 changes: 16 additions & 0 deletions Doc/library/unittest.mock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ available as `mock on PyPI <https://pypi.org/project/mock>`_.
Quick Guide
-----------

.. testsetup::

class ProductionClass:
def method(self, a, b, c):
pass

class SomeClass:
@staticmethod
def static_method(args):
return args

@classmethod
def class_method(cls, args):
return args


:class:`Mock` and :class:`MagicMock` objects create all attributes and
methods as you access them and store details of how they have been used. You
can configure them, to specify return values or limit what attributes are
Expand Down