mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
[3.11] gh-96357: Improve typing.get_overloads
coverage (GH-96358) (#96371)
gh-96357: Improve `typing.get_overloads` coverage (GH-96358)
(cherry picked from commit 675e3470cc
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
94582bb643
commit
f418842a5c
1 changed files with 3 additions and 0 deletions
|
@ -4427,6 +4427,9 @@ class OverloadTests(BaseTestCase):
|
|||
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