Victor Stinner diagnosed on #12167 that some reference leaks came from
util._path_created, a set used for caching; there are two tests that
cause additions to this set, so now they clear it in tearDown, avoiding
17 refleaks. (My tests show that it’s necessary to clear the set in
only one test, clearing it in both does not stop more refleaks, but
there’s no harm in doing it.)
"""Tests for distutils.command.bdist_dumb."""
import os
+import packaging.util
from packaging.dist import Distribution
from packaging.command.bdist_dumb import bdist_dumb
def tearDown(self):
os.chdir(self.old_location)
+ packaging.util._path_created.clear()
super(BuildDumbTestCase, self).tearDown()
@requires_zlib
import sys
from io import StringIO
import stat
+import packaging.util
from packaging.database import disable_cache, enable_cache
from packaging.run import main
def tearDown(self):
os.chdir(self.cwd)
+ packaging.util._path_created.clear()
super(UninstallTestCase, self).tearDown()
def run_setup(self, *args):