mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
bpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)
PR 1/2. Needs backport to 3.9.
This commit is contained in:
parent
a9621bb301
commit
4140f10a16
2 changed files with 6 additions and 3 deletions
|
@ -3048,6 +3048,11 @@ class GetUtilitiesTestCase(TestCase):
|
|||
self.assertEqual(get_args(Callable), ())
|
||||
self.assertEqual(get_args(list[int]), (int,))
|
||||
self.assertEqual(get_args(list), ())
|
||||
self.assertEqual(get_args(collections.abc.Callable[[int], str]), ([int], str))
|
||||
self.assertEqual(get_args(collections.abc.Callable[..., str]), (..., str))
|
||||
self.assertEqual(get_args(collections.abc.Callable[[], str]), ([], str))
|
||||
self.assertEqual(get_args(collections.abc.Callable[[int], str]),
|
||||
get_args(Callable[[int], str]))
|
||||
|
||||
|
||||
class CollectionsAbcTests(BaseTestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue