diff options
| author | kobarity | 2022-10-16 11:15:22 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-10-16 11:15:30 +0200 |
| commit | 45aabe6edae8d841a8985853394baddad4a1949e (patch) | |
| tree | e98145448625d42ba0263f1d06e66f5d11cffad2 /test/lisp/progmodes/python-tests.el | |
| parent | 07222447b6c9e75b713fe3b3954952fbb0e40c71 (diff) | |
| download | emacs-45aabe6edae8d841a8985853394baddad4a1949e.tar.gz emacs-45aabe6edae8d841a8985853394baddad4a1949e.zip | |
Disable completion when PDB is active in Python Shell buffer
* lisp/progmodes/python.el (python-shell-completion-at-point): Disable
completion in Python buffer when PDB is active in Python Shell buffer.
* test/lisp/progmodes/python-tests.el (python-shell-completion-pdb-1):
New test (bug#58562).
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 9ad2d169308..97dc17ce293 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -4427,6 +4427,23 @@ import abc | |||
| 4427 | (insert "abc.") | 4427 | (insert "abc.") |
| 4428 | (should (completion-at-point))))) | 4428 | (should (completion-at-point))))) |
| 4429 | 4429 | ||
| 4430 | (ert-deftest python-shell-completion-pdb-1 () | ||
| 4431 | "Should not complete PDB commands in Python buffer." | ||
| 4432 | (skip-unless (executable-find python-tests-shell-interpreter)) | ||
| 4433 | (python-tests-with-temp-buffer-with-shell | ||
| 4434 | " | ||
| 4435 | import pdb | ||
| 4436 | |||
| 4437 | pdb.set_trace() | ||
| 4438 | print('Hello') | ||
| 4439 | " | ||
| 4440 | (let ((inhibit-message t)) | ||
| 4441 | (python-shell-send-buffer) | ||
| 4442 | (python-tests-shell-wait-for-prompt) | ||
| 4443 | (goto-char (point-max)) | ||
| 4444 | (insert "u") | ||
| 4445 | (should-not (nth 2 (python-completion-at-point)))))) | ||
| 4446 | |||
| 4430 | (ert-deftest python-shell-completion-native-1 () | 4447 | (ert-deftest python-shell-completion-native-1 () |
| 4431 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4448 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4432 | (python-tests-with-temp-buffer-with-shell | 4449 | (python-tests-with-temp-buffer-with-shell |