]> granicus.if.org Git - python/commit
bpo-36996: Handle async functions when mock.patch is used as a decorator (GH-13562)
authorXtreak <tir.karthi@gmail.com>
Tue, 28 May 2019 07:07:39 +0000 (12:37 +0530)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 28 May 2019 07:07:38 +0000 (00:07 -0700)
commit436c2b0d67da68465e709a96daac7340af3a5238
tree771d8d39bd772a7aa72640670e247b7e5bb14f6b
parent71dc7c5fbd856df83202f39c1f41ccd07c6eceb7
bpo-36996: Handle async functions when mock.patch is used as a decorator (GH-13562)

Return a coroutine while patching async functions with a decorator.

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
https://bugs.python.org/issue36996
Lib/unittest/mock.py
Lib/unittest/test/testmock/testasync.py
Misc/NEWS.d/next/Library/2019-05-22-22-55-18.bpo-36996.XQx08d.rst [new file with mode: 0644]