[issue42159] AsyncMock restores stopped patch if same object stopped multiple times

2020-10-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This is not a problem with AsyncMock. The patching is not done when the patch object is created to store reference to the original unpatched function. Hence patcher1, patcher2 that patch the same function don't store a reference to the original

[issue42159] AsyncMock restores stopped patch if same object stopped multiple times

2020-10-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42159] AsyncMock restores stopped patch if same object stopped multiple times

2020-10-26 Thread Lisa Roach
New submission from Lisa Roach : Hard to explain in the title, easier to see via a test case: async def async_func(): raise Exception def test_simultaneous_mocks(self): class Test(IsolatedAsyncioTestCase): async def test_test(self):