mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-119180: PEP 649 compiler changes (#119361)
This commit is contained in:
parent
02c1dfff07
commit
9b8611eeea
28 changed files with 610 additions and 329 deletions
|
@ -6634,7 +6634,7 @@ class GetTypeHintTests(BaseTestCase):
|
|||
gth(None)
|
||||
|
||||
def test_get_type_hints_modules(self):
|
||||
ann_module_type_hints = {1: 2, 'f': Tuple[int, int], 'x': int, 'y': str, 'u': int | float}
|
||||
ann_module_type_hints = {'f': Tuple[int, int], 'x': int, 'y': str, 'u': int | float}
|
||||
self.assertEqual(gth(ann_module), ann_module_type_hints)
|
||||
self.assertEqual(gth(ann_module2), {})
|
||||
self.assertEqual(gth(ann_module3), {})
|
||||
|
@ -6652,7 +6652,7 @@ class GetTypeHintTests(BaseTestCase):
|
|||
self.assertEqual(gth(ann_module.C), # gth will find the right globalns
|
||||
{'y': Optional[ann_module.C]})
|
||||
self.assertIsInstance(gth(ann_module.j_class), dict)
|
||||
self.assertEqual(gth(ann_module.M), {'123': 123, 'o': type})
|
||||
self.assertEqual(gth(ann_module.M), {'o': type})
|
||||
self.assertEqual(gth(ann_module.D),
|
||||
{'j': str, 'k': str, 'y': Optional[ann_module.C]})
|
||||
self.assertEqual(gth(ann_module.Y), {'z': int})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue