Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e52cce6

Browse filesBrowse files
committed
gh-103193: Fix refleaks in test_inspect and test_typing
1 parent 03029ac commit e52cce6
Copy full SHA for e52cce6

File tree

2 files changed

+5
-0
lines changed
Filter options

2 files changed

+5
-0
lines changed

‎Lib/test/test_inspect.py

Copy file name to clipboardExpand all lines: Lib/test/test_inspect.py
+1Lines 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

Copy file name to clipboardExpand all lines: Lib/test/test_typing.py
+4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.