mirror of
https://github.com/python/cpython.git
synced 2025-10-16 03:40:58 +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()
|
blah()
|
||||||
|
|
||||||
@patch("typing._overload_registry",
|
|
||||||
defaultdict(lambda: defaultdict(dict)))
|
|
||||||
def test_overload_on_compiled_functions(self):
|
def test_overload_on_compiled_functions(self):
|
||||||
|
with patch("typing._overload_registry",
|
||||||
|
defaultdict(lambda: defaultdict(dict))):
|
||||||
# The registry starts out empty:
|
# The registry starts out empty:
|
||||||
self.assertEqual(typing._overload_registry, {})
|
self.assertEqual(typing._overload_registry, {})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue