Skip to content
Snippets Groups Projects
Commit 1253ac65 authored by Michael Foord's avatar Michael Foord
Browse files

Doc updates

parent 55673de9
No related branches found
No related tags found
No related merge requests found
......@@ -492,7 +492,23 @@ Attributes
.. attribute:: Mock.mock_calls
XXXX
`mock_calls` records *all* calls to the mock object, its methods, magic
methods *and* return value mocks.
.. doctest::
>>> mock = MagicMock()
>>> mock(1, 2, 3)
<MagicMock name='mock()' id='...'>
>>> mock.first(a=3)
<MagicMock name='mock.first()' id='...'>
>>> mock.second()
<MagicMock name='mock.second()' id='...''>
>>> int(mock)
1
>>> expected = [call(1, 2, 3), call.first(a=3), call.second(), call.__int__()]
>>> mock.mock_calls == expected
True
.. attribute:: Mock.__class__
......
......@@ -29,7 +29,7 @@ __all__ = (
)
__version__ = '0.8.0rc1'
__version__ = '0.8.0rc2'
import pprint
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment