summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/python-tests.el
diff options
context:
space:
mode:
authorkobarity <kobarity@gmail.com>2022-10-16 11:15:22 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-10-16 11:15:30 +0200
commit45aabe6edae8d841a8985853394baddad4a1949e (patch)
treee98145448625d42ba0263f1d06e66f5d11cffad2 /test/lisp/progmodes/python-tests.el
parent07222447b6c9e75b713fe3b3954952fbb0e40c71 (diff)
downloademacs-45aabe6edae8d841a8985853394baddad4a1949e.tar.gz
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.el17
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
(insert "abc.")
(should (completion-at-point)))))
+(ert-deftest python-shell-completion-pdb-1 ()
+ "Should not complete PDB commands in Python buffer."
+ (skip-unless (executable-find python-tests-shell-interpreter))
+ (python-tests-with-temp-buffer-with-shell
+ "
+import pdb
+
+pdb.set_trace()
+print('Hello')
+"
+ (let ((inhibit-message t))
+ (python-shell-send-buffer)
+ (python-tests-shell-wait-for-prompt)
+ (goto-char (point-max))
+ (insert "u")
+ (should-not (nth 2 (python-completion-at-point))))))
+
(ert-deftest python-shell-completion-native-1 ()
(skip-unless (executable-find python-tests-shell-interpreter))
(python-tests-with-temp-buffer-with-shell