]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-96357: Improve `typing.get_overloads` coverage (#96358)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 29 Aug 2022 00:45:24 +0000 (03:45 +0300)
committerGitHub <noreply@github.com>
Mon, 29 Aug 2022 00:45:24 +0000 (17:45 -0700)
Lib/test/test_typing.py

index 3f4101485c6e08beea8c8761bf79a834161fe377..ca7bd8e083c45439318f8433771292b4d6a4c256 100644 (file)
@@ -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.