diff --git a/tests/pypi/whl_installer/wheel_installer_test.py b/tests/pypi/whl_installer/wheel_installer_test.py index 7040b0cfd8..91adddf15a 100644 --- a/tests/pypi/whl_installer/wheel_installer_test.py +++ b/tests/pypi/whl_installer/wheel_installer_test.py @@ -63,7 +63,9 @@ def setUp(self) -> None: shutil.copy(os.path.join("examples", "wheel", self.wheel_name), self.wheel_dir) def tearDown(self): - shutil.rmtree(self.wheel_dir) + # On windows, the wheel file remains open, so gives an error upon + # deletion for some reason. + shutil.rmtree(self.wheel_dir, ignore_errors=True) def test_wheel_exists(self) -> None: wheel_installer._extract_wheel(