Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Sep 6, 2022
1 parent 3a61a94 commit 2979419
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test_typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,23 @@ def blah():

blah()

@patch(
f"{registry_holder.__name__}._overload_registry",
defaultdict(lambda: defaultdict(dict))
)
def test_overload_on_compiled_functions(self):
registry = registry_holder._overload_registry
# The registry starts out empty:
self.assertEqual(registry, {})

# This should just not fail:
overload(sum)
overload(print)

# No overloads are recorded:
self.assertEqual(get_overloads(sum), [])
self.assertEqual(get_overloads(print), [])

def set_up_overloads(self):
def blah():
pass
Expand Down

0 comments on commit 2979419

Please sign in to comment.