File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -4391,19 +4391,19 @@ def blah():
43914391
43924392 blah ()
43934393
4394- @patch ("typing._overload_registry" ,
4395- defaultdict (lambda : defaultdict (dict )))
43964394 def test_overload_on_compiled_functions (self ):
4397- # The registry starts out empty:
4398- self .assertEqual (typing ._overload_registry , {})
4399-
4400- # This should just not fail:
4401- overload (sum )
4402- overload (print )
4403-
4404- # No overloads are recorded (but, it still has a side-effect):
4405- self .assertEqual (typing .get_overloads (sum ), [])
4406- self .assertEqual (typing .get_overloads (print ), [])
4395+ with patch ("typing._overload_registry" ,
4396+ defaultdict (lambda : defaultdict (dict ))):
4397+ # The registry starts out empty:
4398+ self .assertEqual (typing ._overload_registry , {})
4399+
4400+ # This should just not fail:
4401+ overload (sum )
4402+ overload (print )
4403+
4404+ # No overloads are recorded (but, it still has a side-effect):
4405+ self .assertEqual (typing .get_overloads (sum ), [])
4406+ self .assertEqual (typing .get_overloads (print ), [])
44074407
44084408 def set_up_overloads (self ):
44094409 def blah ():
You can’t perform that action at this time.
0 commit comments