mirror of
https://github.com/python/cpython
synced 2024-09-04 15:56:13 +00:00
gh-96357: Improve typing.get_overloads
coverage (#96358)
This commit is contained in:
parent
1c01bd28a0
commit
675e3470cc
|
@ -4416,6 +4416,9 @@ def some_other_func(): pass
|
|||
other_overload = some_other_func
|
||||
def some_other_func(): pass
|
||||
self.assertEqual(list(get_overloads(some_other_func)), [other_overload])
|
||||
# Unrelated function still has no overloads:
|
||||
def not_overloaded(): pass
|
||||
self.assertEqual(list(get_overloads(not_overloaded)), [])
|
||||
|
||||
# Make sure that after we clear all overloads, the registry is
|
||||
# completely empty.
|
||||
|
|
Loading…
Reference in a new issue