mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-126349: test_turtle: Add cleanup to avoid reference leaks (GH-129079)
This commit is contained in:
parent
f5b6356a11
commit
bf150f61ad
1 changed files with 3 additions and 0 deletions
|
|
@ -570,6 +570,9 @@ class TestTurtle(unittest.TestCase):
|
|||
with patch_screen():
|
||||
self.turtle = turtle.Turtle()
|
||||
|
||||
# Reset the Screen singleton to avoid reference leaks
|
||||
self.addCleanup(setattr, turtle.Turtle, '_screen', None)
|
||||
|
||||
def test_begin_end_fill(self):
|
||||
self.assertFalse(self.turtle.filling())
|
||||
self.turtle.begin_fill()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue