We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
files()
1 parent aa331ff commit c6d794fCopy full SHA for c6d794f
Lib/test/test_importlib/resources/test_files.py
@@ -3,6 +3,7 @@
3
import unittest
4
import warnings
5
import importlib
6
+import inspect
7
import contextlib
8
9
from importlib import resources
@@ -90,6 +91,12 @@ def test_module_resources(self):
90
91
92
93
class ImplicitContextFilesTests(SiteDir, unittest.TestCase):
94
+
95
+ def tearDown(self):
96
+ # clean up inspect state to avoid ref leaks (#116731)
97
+ inspect._filesbymodname.clear()
98
+ inspect.modulesbyfile.clear()
99
100
def test_implicit_files(self):
101
"""
102
Without any parameter, files() will infer the location as the caller.
0 commit comments