From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 29 Sep 2022 01:06:21 +0000 (-0700) Subject: [3.11] gh-96357: Improve `typing.get_overloads` coverage (GH-96358) (#96371) X-Git-Tag: v3.11.1~426 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f418842a5c9a1161020e810000114725e7a85002;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-96357: Improve `typing.get_overloads` coverage (GH-96358) (#96371) gh-96357: Improve `typing.get_overloads` coverage (GH-96358) (cherry picked from commit 675e3470ccf3804a36a9cd451b813e9bd655aeb3) Co-authored-by: Nikita Sobolev --- diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 0fce96b76e08..1bcadf8753f9 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -4427,6 +4427,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.