From d571b63726007d6f819ca1d4f75ddbbf0a4241dc Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 28 Aug 2022 11:57:29 +0300 Subject: [PATCH] gh-96357: Improve `typing.get_overloads` coverage --- Lib/test/test_typing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 3f4101485c6e08..ca7bd8e083c454 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -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.