[issue26467] Add async magic method support to unittest.mock.Mock

2019-11-12 Thread miss-islington
miss-islington added the comment: New changeset e5125f7b3b88d8d4814ed7bddbd4f34d24d763dd by Miss Islington (bot) in branch '3.8': Add Ilya Kulakov to Misc/ACKS. (GH-17130) https://github.com/python/cpython/commit/e5125f7b3b88d8d4814ed7bddbd4f34d24d763dd -- nosy: +miss-islington

[issue26467] Add async magic method support to unittest.mock.Mock

2019-11-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +16648 pull_request: https://github.com/python/cpython/pull/17138 ___ Python tracker ___

[issue26467] Add async magic method support to unittest.mock.Mock

2019-11-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset d6d6e2aa0249bb661541705335ddbb97a53d64c8 by Benjamin Peterson (Ilya Kulakov) in branch 'master': Add Ilya Kulakov to Misc/ACKS. (GH-17130) https://github.com/python/cpython/commit/d6d6e2aa0249bb661541705335ddbb97a53d64c8 -- nosy:

[issue26467] Add async magic method support to unittest.mock.Mock

2019-11-12 Thread Brett Cannon
Brett Cannon added the comment: Adding Lisa to potentially add the PR from Ilya. -- assignee: -> lisroach ___ Python tracker ___

[issue26467] Add async magic method support to unittest.mock.Mock

2019-11-12 Thread Ilya Kulakov
Change by Ilya Kulakov : -- pull_requests: +16639 pull_request: https://github.com/python/cpython/pull/17130 ___ Python tracker ___

[issue26467] Add async magic method support to unittest.mock.Mock

2019-05-20 Thread Lisa Roach
Lisa Roach added the comment: Added and AsyncMock class which supports mocking async magic methods. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26467] Add async magic method support to unittest.mock.Mock

2019-05-20 Thread Lisa Roach
Lisa Roach added the comment: New changeset 77b3b7701a34ecf6316469e05b79bb91de2addfa by Lisa Roach in branch 'master': bpo-26467: Adds AsyncMock for asyncio Mock library support (GH-9296) https://github.com/python/cpython/commit/77b3b7701a34ecf6316469e05b79bb91de2addfa -- nosy:

[issue26467] Add async magic method support to unittest.mock.Mock

2019-01-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26467] Add async magic method support to unittest.mock.Mock

2019-01-07 Thread Dima Tisnek
Dima Tisnek added the comment: Perhaps it's possible to vendor asynctest mock in the same vein as `mock` found it's way into unittest? The real power of `asynctest` is in constructs like: with asynctest.mock.patch("module.Class", autospec=True): ... Where mock instances know what

[issue26467] Add async magic method support to unittest.mock.Mock

2018-10-10 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26467] Add async magic method support to unittest.mock.Mock

2018-09-14 Thread Lisa Roach
Change by Lisa Roach : -- keywords: +patch pull_requests: +8725 stage: test needed -> patch review ___ Python tracker ___ ___

[issue26467] Add async magic method support to unittest.mock.Mock

2018-08-23 Thread Julian Mehnle
Change by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26467] Add async magic method support to unittest.mock.Mock

2017-11-04 Thread Chi Hsuan Yen
Change by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue26467] Add async magic method support to unittest.mock.Mock

2017-05-14 Thread Michał Bultrowicz
Michał Bultrowicz added the comment: I guess that it's worth noting that the same problem is being talked about in an issue on the asynctest library: https://github.com/Martiusweb/asynctest/issues/29 -- nosy: +butla ___ Python tracker

[issue26467] Add async magic method support to unittest.mock.Mock

2017-02-14 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag versions: +Python 3.7 ___ Python tracker ___

[issue26467] Add async magic method support to unittest.mock.Mock

2016-12-19 Thread Javier Domingo
Javier Domingo added the comment: I found this while trying to test an async context manager. This is a critical feature to enable migrations to async code, as the impossibility to test something properly is not acceptable in many environments. Implementing it in a way that __call__ returns

[issue26467] Add async magic method support to unittest.mock.Mock

2016-06-06 Thread Brett Cannon
Brett Cannon added the comment: There's also __aiter__, but it's semantics might be changing (issue #27243). Robert or Michael, any opinions on Yusuke's proposal? -- nosy: +rbcollins ___ Python tracker

[issue26467] Add async magic method support to unittest.mock.Mock

2016-06-05 Thread Yusuke Tsutsumi
Yusuke Tsutsumi added the comment: Taking a look at the code, this may require a bit more discussion. Mock's classes create copies of themselves when an attribute is accessed. As such, I can't just add __aexit__ and have it generate a different mock type entirely, unless I know exactly what

[issue26467] Add async magic method support to unittest.mock.Mock

2016-06-04 Thread Yusuke Tsutsumi
Yusuke Tsutsumi added the comment: I'm interested in taking this on. I'm considering for this approach, creating a new MagicProxy class specifically for async, and assigning __aexit__ and __aenter__ to those. The __call__ method itself has to be detected as asynchronous, and I don't believe

[issue26467] Add async magic method support to unittest.mock.Mock

2016-03-01 Thread Brett Cannon
New submission from Brett Cannon: Mock doesn't support stuff like __aexit__ which means you can't mock out something like an async context manager. -- components: Library (Lib) messages: 261092 nosy: brett.cannon, michael.foord priority: normal severity: normal stage: test needed