File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 55import builtins
66import io
77import os
8- import pathlib
98import signal
109import sys
1110import tempfile
@@ -1795,12 +1794,9 @@ def test_commandresult_falsy(commandresult_app):
17951794
17961795
17971796def test_is_text_file_bad_input (base_app ):
1798- # Test with a non-existent file
1799- home_dir = pathlib .Path .home ()
1800- file_path = home_dir / 'does_not_exist'
1801- file_str = f'{ file_path } '
1802- with pytest .raises (FileNotFoundError ):
1803- utils .is_text_file (file_str )
1797+ # Test with a non-existent file - on GitHub Actions Windows test runners, we get a PermissionError
1798+ with pytest .raises ((FileNotFoundError , PermissionError )):
1799+ utils .is_text_file ('does_not_exist.txt' )
18041800
18051801 # Test with a directory
18061802 with pytest .raises (IsADirectoryError ):
You can’t perform that action at this time.
0 commit comments