File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -217,8 +217,8 @@ process flag."
217217
218218(defun pythonic-proper-environment-p (process )
219219 " Determine if python environment has been changed since PROCESS was started."
220- (if (process-get process 'pythonic )
221- t
220+ (--if-let (process-get process 'pythonic )
221+ ( equal ( plist-get it :pythonpath ) (pythonic-get-pythonpath))
222222 (error " Process %s wasn't started with `start-pythonic' "
223223 (process-name process))))
224224
Original file line number Diff line number Diff line change @@ -397,6 +397,12 @@ change since process was start."
397397 (let ((process (start-pythonic :process " out" :args '(" -V" ))))
398398 (should (pythonic-proper-environment-p process))))
399399
400+ (ert-deftest test-pythonic-proper-environment-p-change-pythonpath ()
401+ " `pythonic-proper-environment-p' is null if PYTHONPATH was changed."
402+ (let* ((process (start-pythonic :process " out" :args '(" -V" )))
403+ (python-shell-extra-pythonpaths '(" /home/test/modules" )))
404+ (should-not (pythonic-proper-environment-p process))))
405+
400406; ;; Activate/deactivate environment.
401407
402408(ert-deftest test-pythonic-activate ()
You can’t perform that action at this time.
0 commit comments