gh-71339: Use new assertion methods in test_asyncio (#129051)

This commit is contained in:
Serhiy Storchaka 2025-01-20 13:32:39 +02:00 committed by GitHub
parent 6f167d7134
commit c6b570e5e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 36 additions and 37 deletions

View file

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