[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-09-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I will open a separate PR as discussed around mocking a class with an async method which is patched with AsyncMock. Meanwhile a method that returns a coroutine is patched with a MagicMock and needs to be explicitly mocked with an AsyncMock as new

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-09-10 Thread miss-islington
miss-islington added the comment: New changeset ab74e52f768be5048faf2a11e78822533afebcb7 by Miss Islington (bot) in branch '3.8': bpo-37052: Add examples for mocking async iterators and context managers (GH-14660)

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-09-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +15479 pull_request: https://github.com/python/cpython/pull/15834 ___ Python tracker ___

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-09-10 Thread miss-islington
miss-islington added the comment: New changeset c8dfa7333d6317d7cd8c5c7366023f5a668e3f91 by Miss Islington (bot) (Xtreak) in branch 'master': bpo-37052: Add examples for mocking async iterators and context managers (GH-14660)

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-09-10 Thread Lisa Roach
Lisa Roach added the comment: I think this is a great addition! Ezio and I were chatting about trying to add an example where the child mocks are also AsyncMocks, since by default they will be MagicMocks. Adding him to nosy. -- nosy: +ezio.melotti

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-07-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +14467 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14660 ___ Python tracker

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-05-26 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Since issue26467 implemented AsyncMock along with async dunder methods for MagicMock it enables users to mock async for and async with statements. Currently examples of how to use this is present only in tests and would be good to add it to