Skip to content

Commit 05dc6fb

Browse files
committed
Try to fix path on Windows so test passes
1 parent a2da48a commit 05dc6fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_cmd2.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import builtins
66
import io
77
import os
8+
import pathlib
89
import signal
910
import sys
1011
import tempfile
@@ -1795,8 +1796,11 @@ def test_commandresult_falsy(commandresult_app):
17951796

17961797
def test_is_text_file_bad_input(base_app):
17971798
# 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}'
17981802
with pytest.raises(FileNotFoundError):
1799-
utils.is_text_file('./does_not_exist.txt')
1803+
utils.is_text_file(file_str)
18001804

18011805
# Test with a directory
18021806
with pytest.raises(IsADirectoryError):

0 commit comments

Comments
 (0)