summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.mock.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-11-12 14:57:03 (GMT)
committerGitHub <noreply@github.com>2019-11-12 14:57:03 (GMT)
commit138ccbb02216ca086047c3139857fb44f3dab1f9 (patch)
tree650ba3584d4d173fe36d757063909a09f239ebf2 /Doc/library/unittest.mock.rst
parent9a13a388f202268dd7b771638adbec132449b98b (diff)
downloadcpython-138ccbb02216ca086047c3139857fb44f3dab1f9.zip
cpython-138ccbb02216ca086047c3139857fb44f3dab1f9.tar.gz
cpython-138ccbb02216ca086047c3139857fb44f3dab1f9.tar.bz2
bpo-38738: Fix formatting of True and False. (GH-17083)
* "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>".
Diffstat (limited to 'Doc/library/unittest.mock.rst')
-rw-r--r--Doc/library/unittest.mock.rst34
1 files changed, 17 insertions, 17 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index 3fa3cfd..746cf76 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -360,7 +360,7 @@ the *new_callable* argument to :func:`patch`.
assert the mock has been called with the specified calls.
The :attr:`mock_calls` list is checked for the calls.
- If *any_order* is false (the default) then the calls must be
+ If *any_order* is false then the calls must be
sequential. There can be extra calls before or after the
specified calls.
@@ -1006,11 +1006,11 @@ object::
Assert the mock has been awaited with the specified calls.
The :attr:`await_args_list` list is checked for the awaits.
- If *any_order* is False (the default) then the awaits must be
+ If *any_order* is false then the awaits must be
sequential. There can be extra calls before or after the
specified awaits.
- If *any_order* is True then the awaits can be in any order, but
+ If *any_order* is true then the awaits can be in any order, but
they must all appear in :attr:`await_args_list`.
>>> mock = AsyncMock()
@@ -2085,20 +2085,20 @@ to change the default.
Methods and their defaults:
-* ``__lt__``: NotImplemented
-* ``__gt__``: NotImplemented
-* ``__le__``: NotImplemented
-* ``__ge__``: NotImplemented
-* ``__int__``: 1
-* ``__contains__``: False
-* ``__len__``: 0
-* ``__iter__``: iter([])
-* ``__exit__``: False
-* ``__aexit__``: False
-* ``__complex__``: 1j
-* ``__float__``: 1.0
-* ``__bool__``: True
-* ``__index__``: 1
+* ``__lt__``: ``NotImplemented``
+* ``__gt__``: ``NotImplemented``
+* ``__le__``: ``NotImplemented``
+* ``__ge__``: ``NotImplemented``
+* ``__int__``: ``1``
+* ``__contains__``: ``False``
+* ``__len__``: ``0``
+* ``__iter__``: ``iter([])``
+* ``__exit__``: ``False``
+* ``__aexit__``: ``False``
+* ``__complex__``: ``1j``
+* ``__float__``: ``1.0``
+* ``__bool__``: ``True``
+* ``__index__``: ``1``
* ``__hash__``: default hash for the mock
* ``__str__``: default str for the mock
* ``__sizeof__``: default sizeof for the mock