Skip to content

Commit 27e8a5d

Browse files
committed
Feedback
1 parent 3cd8f9e commit 27e8a5d

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/test_typing_extensions.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5066,19 +5066,29 @@ def test_cannot_combine_closed_and_extra_items(self):
50665066
class TD(TypedDict, closed=True, extra_items=range):
50675067
x: str
50685068

5069-
def test_inlined_too_many_arguments(self):
5069+
def test_typed_dict_signature(self):
5070+
self.assertListEqual(
5071+
list(inspect.signature(TypedDict).parameters),
5072+
['typename', 'fields', 'total', 'closed', 'extra_items', 'kwargs']
5073+
)
5074+
5075+
def test_inline_too_many_arguments(self):
50705076
with self.assertRaises(TypeError):
50715077
TypedDict[{"a": int}, "extra"]
50725078

5073-
def test_inlined_not_a_dict(self):
5079+
def test_inline_not_a_dict(self):
50745080
with self.assertRaises(TypeError):
50755081
TypedDict["not_a_dict"]
50765082

5077-
def test_inlined_empty(self):
5083+
def test_inline_empty(self):
50785084
TD = TypedDict[{}]
50795085
self.assertEqual(TD.__required_keys__, set())
50805086

5081-
def test_inlined(self):
5087+
def test_inline_argument_as_tuple(self):
5088+
TD = TypedDict[({},)]
5089+
self.assertEqual(TD.__required_keys__, set())
5090+
5091+
def test_inline(self):
50825092
TD = TypedDict[{
50835093
"a": int,
50845094
"b": Required[int],

0 commit comments

Comments
 (0)