mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-38161: Removes _AwaitEvent from AsyncMock. (GH-16443)
This commit is contained in:
parent
fb4ae152a9
commit
25e115ec00
3 changed files with 2 additions and 39 deletions
|
@ -4,7 +4,7 @@ import re
|
|||
import unittest
|
||||
|
||||
from unittest.mock import (ANY, call, AsyncMock, patch, MagicMock,
|
||||
create_autospec, _AwaitEvent, sentinel, _CallList)
|
||||
create_autospec, sentinel, _CallList)
|
||||
|
||||
|
||||
def tearDownModule():
|
||||
|
@ -178,7 +178,6 @@ class AsyncAutospecTest(unittest.TestCase):
|
|||
self.assertEqual(spec.await_count, 0)
|
||||
self.assertIsNone(spec.await_args)
|
||||
self.assertEqual(spec.await_args_list, [])
|
||||
self.assertIsInstance(spec.awaited, _AwaitEvent)
|
||||
spec.assert_not_awaited()
|
||||
|
||||
asyncio.run(main())
|
||||
|
@ -212,7 +211,6 @@ class AsyncAutospecTest(unittest.TestCase):
|
|||
self.assertEqual(mock_method.await_count, 0)
|
||||
self.assertEqual(mock_method.await_args_list, [])
|
||||
self.assertIsNone(mock_method.await_args)
|
||||
self.assertIsInstance(mock_method.awaited, _AwaitEvent)
|
||||
mock_method.assert_not_awaited()
|
||||
|
||||
await awaitable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue