We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2da48a commit 05dc6fbCopy full SHA for 05dc6fb
tests/test_cmd2.py
@@ -5,6 +5,7 @@
5
import builtins
6
import io
7
import os
8
+import pathlib
9
import signal
10
import sys
11
import tempfile
@@ -1795,8 +1796,11 @@ def test_commandresult_falsy(commandresult_app):
1795
1796
1797
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):
- utils.is_text_file('./does_not_exist.txt')
1803
+ utils.is_text_file(file_str)
1804
1805
# Test with a directory
1806
with pytest.raises(IsADirectoryError):
0 commit comments