|
43 | 43 |
|
44 | 44 | (ert-deftest test-pythonic-default-directory () |
45 | 45 | "Run processes in $HOME by default." |
46 | | - (should (s-equals-p "~" (pythonic-default-directory)))) |
| 46 | + (should (s-equals-p (f-full "~") (pythonic-default-directory)))) |
47 | 47 |
|
48 | 48 | (ert-deftest test-pythonic-default-directory-localhost () |
49 | 49 | "Pass directory unmodified in clean environment." |
|
53 | 53 | "Default directory must point to the tramp address in the case |
54 | 54 | remote address was specified in the |
55 | 55 | `python-shell-interpreter'." |
56 | | - (let ((python-shell-interpreter "/localhost:/path/to/the/python")) |
57 | | - (should (s-equals-p "/localhost:~" (pythonic-default-directory))))) |
| 56 | + (let ((python-shell-interpreter "/ssh:test@localhost:/path/to/the/python")) |
| 57 | + (should (s-equals-p "/ssh:test@localhost:/home/test/" |
| 58 | + (pythonic-default-directory))))) |
58 | 59 |
|
59 | 60 | (ert-deftest test-pythonic-default-directory-virtualenv-remote () |
60 | 61 | "Virtual environment `default-directory' on the remote host." |
61 | | - (let ((python-shell-virtualenv-path "/localhost:/vagrant/env")) |
62 | | - (should (s-equals-p "/localhost:~" (pythonic-default-directory))))) |
| 62 | + (let ((python-shell-virtualenv-path "/ssh:test@localhost:/vagrant/env")) |
| 63 | + (should (s-equals-p "/ssh:test@localhost:/home/test/" |
| 64 | + (pythonic-default-directory))))) |
63 | 65 |
|
64 | 66 | ;;; Set PYTHONPATH variable. |
65 | 67 |
|
@@ -194,7 +196,7 @@ remote host." |
194 | 196 | (call-pythonic :buffer "*out1*" |
195 | 197 | :cwd "~" |
196 | 198 | :args '("-c" "from __future__ import print_function; import os; print(os.getcwd())")) |
197 | | - (should (s-equals-p (s-concat (expand-file-name "~") "\n") |
| 199 | + (should (s-equals-p (s-concat (f-expand "~") "\n") |
198 | 200 | (with-current-buffer "*out1*" |
199 | 201 | (buffer-string))))) |
200 | 202 |
|
@@ -240,7 +242,7 @@ remote host." |
240 | 242 | :args '("-c" "from __future__ import print_function; import os; print(os.getcwd())")))) |
241 | 243 | (while (process-live-p process) |
242 | 244 | (accept-process-output process)) |
243 | | - (should (s-equals-p (s-concat (expand-file-name "~") "\n\nProcess out5 finished\n") |
| 245 | + (should (s-equals-p (s-concat (f-expand "~") "\n\nProcess out5 finished\n") |
244 | 246 | (with-current-buffer "*out5*" |
245 | 247 | (buffer-string)))))) |
246 | 248 |
|
@@ -312,7 +314,7 @@ remote host." |
312 | 314 | (ert-deftest test-start-pythonic-default-directory-property () |
313 | 315 | "Set `pythonic-default-directory' result as `default-directory' process property." |
314 | 316 | (let ((default-directorys "~")) |
315 | | - (should (equal "~" |
| 317 | + (should (equal (f-full "~") |
316 | 318 | (process-get |
317 | 319 | (start-pythonic :process "out" :args '("-V")) |
318 | 320 | 'default-directory))))) |
|
0 commit comments