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 5
5
import builtins
6
6
import io
7
7
import os
8
- import pathlib
9
8
import signal
10
9
import sys
11
10
import tempfile
@@ -1795,12 +1794,9 @@ def test_commandresult_falsy(commandresult_app):
1795
1794
1796
1795
1797
1796
def 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' )
1804
1800
1805
1801
# Test with a directory
1806
1802
with pytest .raises (IsADirectoryError ):
You can’t perform that action at this time.
0 commit comments