diff --git a/Lib/packaging/tests/test_command_install_data.py b/Lib/packaging/tests/test_command_install_data.py index 7f4af419587..94d6a215b36 100644 --- a/Lib/packaging/tests/test_command_install_data.py +++ b/Lib/packaging/tests/test_command_install_data.py @@ -99,7 +99,9 @@ def test_resources(self): self.write_file('spamd', '# Python script') sysconfig._SCHEMES.set(_get_default_scheme(), 'scripts', scripts_dir) sys.path.insert(0, install_dir) + packaging.database.disable_cache() self.addCleanup(sys.path.remove, install_dir) + self.addCleanup(packaging.database.enable_cache) cmd = install_dist(dist) cmd.outputs = ['spamd']