Skip to content

Commit 5ca902c

Browse files
committed
Respect interpreter in the proper environment check.
1 parent 91fdc5d commit 5ca902c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

pythonic.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ process flag."
219219
"Determine if python environment has been changed since PROCESS was started."
220220
(--if-let (process-get process 'pythonic)
221221
(and
222+
(equal (car (process-command process)) (pythonic-executable))
222223
(equal (plist-get it :connection) (pythonic-tramp-connection))
223224
(equal (plist-get it :pythonpath) (pythonic-get-pythonpath))
224225
(equal (plist-get it :path) (pythonic-get-path))

test/pythonic-test.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,12 @@ change since process was start."
420420
(python-shell-process-environment '("TEST=t")))
421421
(should-not (pythonic-proper-environment-p process))))
422422

423+
(ert-deftest test-pythonic-proper-environment-p-change-interpreter ()
424+
"`pythonic-proper-environment-p' is null if interpreter path was changed."
425+
(let* ((process (start-pythonic :process "out" :args '("-V")))
426+
(python-shell-interpreter "/path/to/the/python"))
427+
(should-not (pythonic-proper-environment-p process))))
428+
423429
(ert-deftest test-pythonic-proper-environment-p-change-host ()
424430
"`pythonic-proper-environment-p' is null if tramp host was changed."
425431
;; `unwind-protect' block is unnecessary here because non of tramp

0 commit comments

Comments
 (0)