From 9683c1a82add3182be967050d164349da426a20f Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Mon, 29 Aug 2022 14:57:38 +0300 Subject: [PATCH] Backport test case from #python/cpython/96358 (#71) --- src/test_typing_extensions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test_typing_extensions.py b/src/test_typing_extensions.py index ee498e56..b9d9a4a4 100644 --- a/src/test_typing_extensions.py +++ b/src/test_typing_extensions.py @@ -488,6 +488,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.