summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 1c05944..4782c92 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -15,6 +15,7 @@ import types
import unittest
import weakref
from unittest import mock
+from types import GenericAlias
import asyncio
from asyncio import coroutines
@@ -120,6 +121,12 @@ class BaseTaskTests:
self.loop.set_task_factory(self.new_task)
self.loop.create_future = lambda: self.new_future(self.loop)
+
+ def test_generic_alias(self):
+ task = self.__class__.Task[str]
+ self.assertEqual(task.__args__, (str,))
+ self.assertIsInstance(task, GenericAlias)
+
def test_task_cancel_message_getter(self):
async def coro():
pass