8000 Updates news with AsyncMock name change. · lisroach/cpython@c0a88a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0a88a9

Browse files
committed
Updates news with AsyncMock name change.
1 parent 45dddb7 commit c0a88a9
Copy full SHA for c0a88a9

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Lib/unittest/test/testmock/testasync.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from unittest.mock import call, AsyncMock, patch, MagicMock
66

7-
# TODO: lisa move 3.7 specific syntax to its own file
87
class AsyncClass:
98
def __init__(self):
109
pass
@@ -30,14 +29,9 @@ def a(self):
3029

3130
class AsyncPatchDecoratorTest(unittest.TestCase):
3231
def test_is_coroutine_function_patch(self):
33-
# @patch.object(AsyncClass, 'normal_method')
34-
# def test_normal_method(mock_method):
35-
# import types
36-
# self.assertTrue(isinstance(mock_method, types.MethodType))
3732
@patch.object(AsyncClass, 'async_method')
3833
def test_async(mock_method):
3934
self.assertTrue(asyncio.iscoroutinefunction(mock_method))
40-
# test_normal_method()
4135
test_async()
4236

4337
def test_is_async_patch(self):
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
Added CoroutineMock to support using unittest to mock asyncio coroutines.
1+
2+
Addedi AsyncMock to support using unittest to mock asyncio coroutines.
23
Patch by Lisa Roach.

0 commit comments

Comments
 (0)
0