diff --git a/Lib/packaging/tests/test_command_bdist_dumb.py b/Lib/packaging/tests/test_command_bdist_dumb.py index fd199ea932e..25f3276b0c8 100644 --- a/Lib/packaging/tests/test_command_bdist_dumb.py +++ b/Lib/packaging/tests/test_command_bdist_dumb.py @@ -1,6 +1,7 @@ """Tests for distutils.command.bdist_dumb.""" import os +import packaging.util from packaging.dist import Distribution from packaging.command.bdist_dumb import bdist_dumb @@ -18,6 +19,7 @@ class BuildDumbTestCase(support.TempdirManager, def tearDown(self): os.chdir(self.old_location) + packaging.util._path_created.clear() super(BuildDumbTestCase, self).tearDown() @requires_zlib diff --git a/Lib/packaging/tests/test_uninstall.py b/Lib/packaging/tests/test_uninstall.py index 00e97e4c700..0ef7f3be90b 100644 --- a/Lib/packaging/tests/test_uninstall.py +++ b/Lib/packaging/tests/test_uninstall.py @@ -3,6 +3,7 @@ import os import sys from io import StringIO import stat +import packaging.util from packaging.database import disable_cache, enable_cache from packaging.run import main @@ -43,6 +44,7 @@ class UninstallTestCase(support.TempdirManager, def tearDown(self): os.chdir(self.cwd) + packaging.util._path_created.clear() super(UninstallTestCase, self).tearDown() def run_setup(self, *args):