New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve test coverage for AsyncMock. #17906
Conversation
* Add test for nested async decorator patch. * Add test for side_effect and wraps with a function. * Add test for side_effect with an exception in the iterable.
FWIW, with the PR the coverage increases from 98.51% to 99.22% : https://codecov.io/gh/python/cpython/src/bfaaed1587756b32b8c7d04f3ad197ee4b3ef51c/Lib/unittest/mock.py |
Thanks @tirkarthi for the PR, and @cjw296 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
* Add test for nested async decorator patch. * Add test for side_effect and wraps with a function. * Add test for side_effect with an exception in the iterable. (cherry picked from commit 54f743e) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
GH-18165 is a backport of this pull request to the 3.8 branch. |
I feel this is safe to backport tests to 3.8 since |
* Add test for nested async decorator patch. * Add test for side_effect and wraps with a function. * Add test for side_effect with an exception in the iterable. (cherry picked from commit 54f743e) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
* Add test for nested async decorator patch. * Add test for side_effect and wraps with a function. * Add test for side_effect with an exception in the iterable.
Test added with report from https://codecov.io/gh/python/cpython/src/ec0496240aaadfd4d75a80bfffdbb94fa385b7ab/Lib/unittest/mock.py