summaryrefslogtreecommitdiff
path: root/test/lisp
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2018-05-15 01:30:11 +0900
committerTino Calancha <tino.calancha@gmail.com>2018-05-15 01:30:11 +0900
commitb015fb0ce37235480af8d80bce8c2f9b7e6258eb (patch)
tree39ee5a78a3c0a8fe13bbf42652a73301d21eb4e0 /test/lisp
parentc2caf763cfe3bb85b4933ffac12695a7cb366cd4 (diff)
downloademacs-b015fb0ce37235480af8d80bce8c2f9b7e6258eb.tar.gz
run-python: Make the buffer running python current
* lisp/progmodes/python.el (run-python, python-shell-make-comint): Make the buffer running the inferior python process the current buffer (Bug#31398). * test/lisp/progmodes/python-tests.el (python-tests--bug31398): Add test.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/progmodes/python-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index 4955da02a25..dd1c45914e2 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -5352,6 +5352,14 @@ buffer with overlapping strings."
(python-nav-end-of-statement)))
(should (eolp))))
+;; After call `run-python' the buffer running the python process is current.
+(ert-deftest python-tests--bug31398 ()
+ "Test for https://debbugs.gnu.org/31398 ."
+ (let ((buffer (process-buffer (run-python nil nil 'show))))
+ (should (eq buffer (current-buffer)))
+ (pop-to-buffer (other-buffer))
+ (run-python nil nil 'show)
+ (should (eq buffer (current-buffer)))))
(provide 'python-tests)