ci: windows with VM

This commit is contained in:
Fu Hanxi
2026-04-27 12:41:53 +02:00
parent c2d4a780f8
commit a38c7e9242
4 changed files with 54 additions and 87 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ def safe_cleanup_tmpdir(tmpdir: tempfile.TemporaryDirectory) -> None:
"""Safely cleanup temporary directory, handling specific errors on Windows."""
try:
tmpdir.cleanup()
except (PermissionError, NotADirectoryError):
except (PermissionError, NotADirectoryError, OSError):
# OSError: The directory is not empty
warnings.warn(
f'Failed to cleanup temporary directory {tmpdir.name}. '
'This is common on Windows when files are still in use.',