@@ -109,15 +109,17 @@ def test_ro_file(lock_type: type[BaseFileLock], tmp_file_ro: Path) -> None:
109109 pytest .param (FileNotFoundError , "No such file or directory:" , "" , id = "blank_filename" ),
110110 pytest .param (ValueError , "embedded null (byte|character)" , "\0 " , id = "null_byte" ),
111111 # Should be PermissionError on Windows
112- pytest .param (PermissionError , "Permission denied:" , "." , id = "current_directory" )
113- if sys .platform == "win32"
114- else (
115- # Should be IsADirectoryError on MacOS and Linux
116- pytest .param (IsADirectoryError , "Is a directory" , "." , id = "current_directory" )
117- if sys .platform in ["darwin" , "linux" ]
118- else
119- # Should be some type of OSError at least on other operating systems
120- pytest .param (OSError , None , "." , id = "current_directory" )
112+ (
113+ pytest .param (PermissionError , "Permission denied:" , "." , id = "current_directory" )
114+ if sys .platform == "win32"
115+ else (
116+ # Should be IsADirectoryError on MacOS and Linux
117+ pytest .param (IsADirectoryError , "Is a directory" , "." , id = "current_directory" )
118+ if sys .platform in ["darwin" , "linux" ]
119+ else
120+ # Should be some type of OSError at least on other operating systems
121+ pytest .param (OSError , None , "." , id = "current_directory" )
122+ )
121123 ),
122124 ]
123125 + [pytest .param (OSError , "Invalid argument" , i , id = f"invalid_{ i } " , marks = WindowsOnly ) for i in '<>:"|?*\a ' ]
0 commit comments