summaryrefslogtreecommitdiff
path: root/tests/functional/t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/t')
-rw-r--r--tests/functional/t/typedDict.py18
-rw-r--r--tests/functional/t/typedDict.rc2
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/t/typedDict.py b/tests/functional/t/typedDict.py
new file mode 100644
index 000000000..9fdcee2ee
--- /dev/null
+++ b/tests/functional/t/typedDict.py
@@ -0,0 +1,18 @@
+"""Test typing.TypedDict"""
+# pylint: disable=invalid-name,missing-class-docstring,too-few-public-methods
+import typing
+from typing import TypedDict
+
+
+class CustomTD(TypedDict):
+ var: int
+
+class CustomTD2(typing.TypedDict, total=False):
+ var2: str
+
+class CustomTD3(CustomTD2):
+ var3: int
+
+CustomTD4 = TypedDict("CustomTD4", var4=bool)
+
+CustomTD5 = TypedDict("CustomTD5", {"var5": bool})
diff --git a/tests/functional/t/typedDict.rc b/tests/functional/t/typedDict.rc
new file mode 100644
index 000000000..85fc502b3
--- /dev/null
+++ b/tests/functional/t/typedDict.rc
@@ -0,0 +1,2 @@
+[testoptions]
+min_pyver=3.8