gh-96478: Fix new test when run in refleak mode (#96615)

./python.exe -m test -R : test.test_typing would fail, apparently
because the dictionary used in the @patch decorator was modified.
This commit is contained in:
Jelle Zijlstra 2022-09-06 09:33:09 -07:00 committed by GitHub
parent 222f10ca2d
commit f0d9136c69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4391,9 +4391,9 @@ class OverloadTests(BaseTestCase):
blah()
@patch("typing._overload_registry",
defaultdict(lambda: defaultdict(dict)))
def test_overload_on_compiled_functions(self):
with patch("typing._overload_registry",
defaultdict(lambda: defaultdict(dict))):
# The registry starts out empty:
self.assertEqual(typing._overload_registry, {})