aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_contextlib_async.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2025-05-22 13:17:22 +0300
committerGitHub <noreply@github.com>2025-05-22 13:17:22 +0300
commit2602d8ae981c4bae1cada2c174b367d97f712efb (patch)
treeb4b9f49c391469ee1fa894a85303916e47201aa1 /Lib/test/test_contextlib_async.py
parentbb244fd33d3eb67923ec3253568867bfaed9895f (diff)
downloadcpython-2602d8ae981c4bae1cada2c174b367d97f712efb.tar.gz
cpython-2602d8ae981c4bae1cada2c174b367d97f712efb.zip
gh-71339: Use new assertion methods in tests (GH-129046)
Diffstat (limited to 'Lib/test/test_contextlib_async.py')
-rw-r--r--Lib/test/test_contextlib_async.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_contextlib_async.py b/Lib/test/test_contextlib_async.py
index 7750186e56a..dcd00720379 100644
--- a/Lib/test/test_contextlib_async.py
+++ b/Lib/test/test_contextlib_async.py
@@ -77,23 +77,23 @@ class TestAbstractAsyncContextManager(unittest.TestCase):
async def __aexit__(self, exc_type, exc_value, traceback):
return None
- self.assertTrue(issubclass(ManagerFromScratch, AbstractAsyncContextManager))
+ self.assertIsSubclass(ManagerFromScratch, AbstractAsyncContextManager)
class DefaultEnter(AbstractAsyncContextManager):
async def __aexit__(self, *args):
await super().__aexit__(*args)
- self.assertTrue(issubclass(DefaultEnter, AbstractAsyncContextManager))
+ self.assertIsSubclass(DefaultEnter, AbstractAsyncContextManager)
class NoneAenter(ManagerFromScratch):
__aenter__ = None
- self.assertFalse(issubclass(NoneAenter, AbstractAsyncContextManager))
+ self.assertNotIsSubclass(NoneAenter, AbstractAsyncContextManager)
class NoneAexit(ManagerFromScratch):
__aexit__ = None
- self.assertFalse(issubclass(NoneAexit, AbstractAsyncContextManager))
+ self.assertNotIsSubclass(NoneAexit, AbstractAsyncContextManager)
class AsyncContextManagerTestCase(unittest.TestCase):