From: Nikita Sobolev Date: Mon, 29 Aug 2022 00:45:24 +0000 (+0300) Subject: gh-96357: Improve `typing.get_overloads` coverage (#96358) X-Git-Tag: v3.12.0a1~540 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=675e3470ccf3804a36a9cd451b813e9bd655aeb3;p=thirdparty%2FPython%2Fcpython.git gh-96357: Improve `typing.get_overloads` coverage (#96358) --- diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 3f4101485c6e..ca7bd8e083c4 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.