mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-96357: Improve typing.get_overloads coverage (#96358)
This commit is contained in:
parent
1c01bd28a0
commit
675e3470cc
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue