gh-96357: Improve typing.get_overloads coverage (#96358)

This commit is contained in:
Nikita Sobolev 2022-08-29 03:45:24 +03:00 committed by GitHub
parent 1c01bd28a0
commit 675e3470cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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