summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r--Lib/test/test_typing.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 03f03fe..957d7af 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -554,6 +554,12 @@ class TypeVarTests(BaseTestCase):
vals[x] = cls(str(x))
del vals
+ def test_constructor(self):
+ T = TypeVar(name="T")
+ self.assertEqual(T.__name__, "T")
+ self.assertEqual(T.__constraints__, ())
+ self.assertIs(T.__bound__, None)
+
def template_replace(templates: list[str], replacements: dict[str, list[str]]) -> list[tuple[str]]:
"""Renders templates with possible combinations of replacements.