[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:
Miss Islington (bot) 2022-09-28 18:06:21 -07:00 committed by GitHub
parent 94582bb643
commit f418842a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.