@@ -1547,17 +1547,19 @@ def _denied(*args, **kwargs):
15471547@pytest .mark .parametrize (
15481548 "winerror, should_raise" ,
15491549 [
1550+ pytest .param (5 , False , id = "access_denied_swallowed" ),
15501551 pytest .param (32 , False , id = "sharing_violation_swallowed" ),
15511552 pytest .param (33 , False , id = "lock_violation_swallowed" ),
1552- pytest .param (5 , True , id = "access_denied_propagates " ),
1553+ pytest .param (1 , True , id = "other_winerror_propagates " ),
15531554 pytest .param (None , True , id = "no_winerror_propagates" ),
15541555 ],
15551556)
15561557def test_filestream_cache_permission_error_windows_is_narrowed (tmp_path , monkeypatch , winerror , should_raise ):
1557- """On Windows, only ERROR_SHARING_VIOLATION (32) and ERROR_LOCK_VIOLATION
1558- (33) count as the "target held open by another process" case worth
1559- swallowing. Any other PermissionError -- ACL issues, read-only dirs,
1560- missing winerror attribute, etc. -- is a real problem and must propagate."""
1558+ """On Windows, ERROR_ACCESS_DENIED (5), ERROR_SHARING_VIOLATION (32) and
1559+ ERROR_LOCK_VIOLATION (33) are all transient "target held open by another
1560+ process / pending delete" cases worth swallowing after the bounded retry.
1561+ Any other PermissionError -- unrelated winerrors, missing winerror
1562+ attribute, etc. -- is a real problem and must propagate."""
15611563 import os as _os
15621564
15631565 from cuda .core .utils import FileStreamProgramCache , _program_cache
0 commit comments