File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ necessary. SENTINEL must be a symbol of process sentinel
198198function if necessary. QUERY-ON-EXIT will be corresponding
199199process flag."
200200 (let ((default-directory (pythonic-default-directory cwd))
201- (process-environment (copy-sequence process-environment)))
201+ (process-environment (copy-sequence process-environment))
202+ (buffer (and buffer (get-buffer-create buffer))))
202203 (pythonic-set-process-environment)
203204 (let ((process (apply 'start-file-process process buffer (pythonic-executable) args)))
204205 (when filter
Original file line number Diff line number Diff line change @@ -306,6 +306,23 @@ remote host."
306306 (should (process-query-on-exit-flag
307307 (start-pythonic :process " out" :args '(" -V" ) :query-on-exit t ))))
308308
309+ (ert-deftest test-start-pythonic-keep-serviceable-tramp-connection ()
310+ " It is possible to work with remote host (use `find-file' for
311+ example) after we start pythonic process."
312+ (unwind-protect
313+ (let* ((python-shell-interpreter " /ssh:test@localhost:/usr/bin/python" )
314+ (buffer (generate-new-buffer-name " *out*" ))
315+ (process (start-pythonic :process " out"
316+ :buffer buffer
317+ :args '(" -c" " raise SystemExit(1)" ))))
318+ (while (process-live-p process)
319+ (accept-process-output process))
320+ (find-file " /ssh:test@localhost:/home/test/x.py" )
321+ (should (get-buffer " x.py" )))
322+ (kill-buffer " *tramp/ssh test@localhost*" )
323+ (setq tramp-current-connection)
324+ (sleep-for 0.5 )))
325+
309326; ;; Proper process environment detection.
310327
311328(ert-deftest test-start-pythonic-path-property ()
You can’t perform that action at this time.
0 commit comments