aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Doc/library/unittest.mock.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/unittest.mock.rst')
-rw-r--r--Doc/library/unittest.mock.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index 163da9aecdb..36ac24afa2b 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -1945,7 +1945,7 @@ The full list of supported magic methods is:
* Container methods: ``__getitem__``, ``__setitem__``, ``__delitem__``,
``__contains__``, ``__len__``, ``__iter__``, ``__reversed__``
and ``__missing__``
-* Context manager: ``__enter__`` and ``__exit__``
+* Context manager: ``__enter__``, ``__exit__``, ``__aenter`` and ``__aexit__``
* Unary numeric methods: ``__neg__``, ``__pos__`` and ``__invert__``
* The numeric methods (including right hand and in-place variants):
``__add__``, ``__sub__``, ``__mul__``, ``__matmul__``, ``__div__``, ``__truediv__``,
@@ -1957,10 +1957,14 @@ The full list of supported magic methods is:
* Pickling: ``__reduce__``, ``__reduce_ex__``, ``__getinitargs__``,
``__getnewargs__``, ``__getstate__`` and ``__setstate__``
* File system path representation: ``__fspath__``
+* Asynchronous iteration methods: ``__aiter__`` and ``__anext__``
.. versionchanged:: 3.8
Added support for :func:`os.PathLike.__fspath__`.
+.. versionchanged:: 3.8
+ Added support for ``__aenter__``, ``__aexit__``, ``__aiter__`` and ``__anext__``.
+
The following methods exist but are *not* supported as they are either in use
by mock, can't be set dynamically, or can cause problems: