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

+1
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

+4
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)