diff options
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 6ab9c62746e..752a4f0113f 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -5448,15 +5448,21 @@ buffer with overlapping strings." | |||
| 5448 | (python-nav-end-of-statement))) | 5448 | (python-nav-end-of-statement))) |
| 5449 | (should (eolp)))) | 5449 | (should (eolp)))) |
| 5450 | 5450 | ||
| 5451 | ;; After call `run-python' the buffer running the python process is current. | 5451 | ;; Interactively, `run-python' focuses the buffer running the |
| 5452 | (ert-deftest python-tests--bug31398 () | 5452 | ;; interpreter. |
| 5453 | "Test for https://debbugs.gnu.org/31398 ." | 5453 | (ert-deftest python-tests--run-python-selects-window () |
| 5454 | "Test for bug#31398. See also bug#44421 and bug#52380." | ||
| 5454 | (skip-unless (executable-find python-tests-shell-interpreter)) | 5455 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 5455 | (let ((buffer (process-buffer (run-python nil nil 'show)))) | 5456 | (let* ((buffer (process-buffer (run-python nil nil 'show))) |
| 5456 | (should (eq buffer (current-buffer))) | 5457 | (window (get-buffer-window buffer))) |
| 5458 | ;; We look at `selected-window' rather than `current-buffer' | ||
| 5459 | ;; because as `(elisp)Current buffer' says, the latter will only | ||
| 5460 | ;; be synchronized with the former when returning to the "command | ||
| 5461 | ;; loop"; until then, `current-buffer' can change arbitrarily. | ||
| 5462 | (should (eq window (selected-window))) | ||
| 5457 | (pop-to-buffer (other-buffer)) | 5463 | (pop-to-buffer (other-buffer)) |
| 5458 | (run-python nil nil 'show) | 5464 | (run-python nil nil 'show) |
| 5459 | (should (eq buffer (current-buffer))))) | 5465 | (should (eq window (selected-window))))) |
| 5460 | 5466 | ||
| 5461 | (ert-deftest python-tests--fill-long-first-line () | 5467 | (ert-deftest python-tests--fill-long-first-line () |
| 5462 | (should | 5468 | (should |