Skip to content

Commit e52cce6

Browse files
committed
gh-103193: Fix refleaks in test_inspect and test_typing
1 parent 03029ac commit e52cce6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Lib/test/test_inspect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def revise(filename, *args):
6969
def tearDownModule():
7070
if support.has_socket_support:
7171
asyncio.set_event_loop_policy(None)
72+
inspect._shadowed_dict_from_mro_tuple.cache_clear()
7273

7374

7475
def signatures_with_lexicographic_keyword_only_parameters():

Lib/test/test_typing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
CANNOT_SUBCLASS_INSTANCE = 'Cannot subclass an instance of %s'
5757

5858

59+
def tearDownModule():
60+
inspect._shadowed_dict_from_mro_tuple.cache_clear()
61+
62+
5963
class BaseTestCase(TestCase):
6064

6165
def assertIsSubclass(self, cls, class_or_tuple, msg=None):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy