mirror of
https://github.com/python/cpython.git
synced 2025-10-15 11:22:18 +00:00
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:
parent
222f10ca2d
commit
f0d9136c69
1 changed files with 10 additions and 10 deletions
|
@ -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, {})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue