mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-71339: Use new assertion methods in test_asyncio
(#129051)
This commit is contained in:
parent
6f167d7134
commit
c6b570e5e3
10 changed files with 36 additions and 37 deletions
|
@ -110,7 +110,7 @@ class BaseTaskTests:
|
|||
async def coro():
|
||||
pass
|
||||
t = self.new_task(self.loop, coro())
|
||||
self.assertTrue(hasattr(t, '_cancel_message'))
|
||||
self.assertHasAttr(t, '_cancel_message')
|
||||
self.assertEqual(t._cancel_message, None)
|
||||
|
||||
t.cancel('my message')
|
||||
|
@ -3131,7 +3131,7 @@ class CCurrentLoopTests(BaseCurrentLoopTests, test_utils.TestCase):
|
|||
class GenericTaskTests(test_utils.TestCase):
|
||||
|
||||
def test_future_subclass(self):
|
||||
self.assertTrue(issubclass(asyncio.Task, asyncio.Future))
|
||||
self.assertIsSubclass(asyncio.Task, asyncio.Future)
|
||||
|
||||
@support.cpython_only
|
||||
def test_asyncio_module_compiled(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue