bpo-38161: Removes _AwaitEvent from AsyncMock. (GH-16443)

This commit is contained in:
Lisa Roach 2019-09-29 21:01:28 -07:00 committed by GitHub
parent fb4ae152a9
commit 25e115ec00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 39 deletions

View file

@ -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