Lisa Roach <lisaroac...@gmail.com> added the comment:
Lately I have been having my doubts around having MagicMocks also create AsyncMocks as children. Should a MagicMock really have a __aenter__ magic method? Is this too far from the original MagicMock if we change child mocks to default not to their parent type, but to their parent type *or* AsyncMock if asynchronous? It makes the using the mocks easier, since you can just use MagicMock or AsyncMock for whatever you are doing and not think about when to use which. But it also might make the code more confusing, since it isn't as clear when to use one or the other. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38163> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com