mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fix memory leaks in test_capi (#98017)
This commit is contained in:
parent
f99bb20cde
commit
be4099e55d
2 changed files with 6 additions and 0 deletions
|
@ -1495,6 +1495,9 @@ class TestDictWatchers(unittest.TestCase):
|
|||
unraisable = unraisables[0]
|
||||
self.assertIs(unraisable.object, d)
|
||||
self.assertEqual(str(unraisable.exc_value), "boom!")
|
||||
# avoid leaking reference cycles
|
||||
del unraisable
|
||||
del unraisables
|
||||
|
||||
def test_two_watchers(self):
|
||||
d1 = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue