From 675e3470ccf3804a36a9cd451b813e9bd655aeb3 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Mon, 29 Aug 2022 03:45:24 +0300 Subject: gh-96357: Improve `typing.get_overloads` coverage (#96358) --- 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 3f41014..ca7bd8e 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -4416,6 +4416,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. -- cgit v0.12