Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_overloads() #1140

Merged
merged 5 commits into from
Apr 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint the tests
  • Loading branch information
JelleZijlstra committed Apr 16, 2022
commit 80da2ea0c5d75a7e16641d7c3bf5f9ea3709b62a
8 changes: 5 additions & 3 deletions typing_extensions/src/test_typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,12 @@ def blah():
return blah, [overload1, overload2]

# Make sure we don't clear the global overload registry
@patch(f"{registry_holder.__name__}._overload_registry",
defaultdict(lambda: defaultdict(dict)))
@patch(
f"{registry_holder.__name__}._overload_registry",
defaultdict(lambda: defaultdict(dict))
)
def test_overload_registry(self):
registry = getattr(registry_holder, "_overload_registry")
registry = registry_holder._overload_registry
# The registry starts out empty
self.assertEqual(registry, {})

Expand Down