diff options
| author | Xtreak <tir.karthi@gmail.com> | 2019-05-27 18:26:23 +0530 |
|---|---|---|
| committer | Yury Selivanov <yury@magic.io> | 2019-05-27 14:56:23 +0200 |
| commit | ff6b2e66b19a26b4c2ab57e62e1ab9f3d94dd76a (patch) | |
| tree | e563196c349a6af42abc885045947360a2299fed /Doc | |
| parent | 431b540bf79f0982559b1b0e420b1b085f667bb7 (diff) | |
| download | cpython-git-ff6b2e66b19a26b4c2ab57e62e1ab9f3d94dd76a.tar.gz | |
bpo-37047: Refactor AsyncMock setup logic for autospeccing (GH-13574)
Handle late binding and attribute access in unittest.mock.AsyncMock
setup for autospeccing.
Diffstat (limited to 'Doc')
| -rw-r--r-- | Doc/library/unittest.mock.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 163da9aecd..36ac24afa2 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: |
