We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b339c commit eebecfbCopy full SHA for eebecfb
Lib/test/test_typing.py
@@ -8478,6 +8478,22 @@ class TD2(TD1):
8478
b: str
8479
8480
self.assertIs(TD2.__total__, True)
8481
+
8482
+ def test_total_with_value(self):
8483
+ class TD(TypedDict):
8484
+ __total__ = "some_value"
8485
8486
+ self.assertIs(TD.__total__, True)
8487
8488
+ class TD2(TypedDict, total=True):
8489
8490
8491
+ self.assertIs(TD2.__total__, True)
8492
8493
+ class TD3(TypedDict, total=False):
8494
+ __total__ = "some value"
8495
8496
+ self.assertIs(TD3.__total__, False)
8497
8498
def test_optional_keys(self):
8499
class Point2Dor3D(Point2D, total=False):
0 commit comments