Move and rename Python completion ERTs
authorkobarity <kobarity@gmail.com>
Sun, 16 Oct 2022 13:26:29 +0000 (15:26 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 16 Oct 2022 13:26:49 +0000 (15:26 +0200)
* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-1)
(python-shell-completion-at-point-native-1)
(python-completion-at-point-1)
(python-completion-at-point-2, python-completion-at-point-pdb-1)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Renamed tests
(bug#58565).

test/lisp/progmodes/python-tests.el

index 71bd0e0d682f7df7a4217091f120342c7bb89ac1..81c9217c62c6eb4748aceeb8c260d1561ad3219a 100644 (file)
@@ -4396,7 +4396,41 @@ def foo():
          (python-shell-interpreter "/some/path/to/bin/pypy"))
     (should (python-shell-completion-native-interpreter-disabled-p))))
 
-(ert-deftest python-shell-completion-1 ()
+(ert-deftest python-shell-completion-at-point-1 ()
+  (skip-unless (executable-find python-tests-shell-interpreter))
+  (python-tests-with-temp-buffer-with-shell
+   ""
+   (python-shell-with-shell-buffer
+     (insert "import abc")
+     (comint-send-input)
+     (python-tests-shell-wait-for-prompt)
+     (insert "abc.")
+     (should (nth 2 (python-shell-completion-at-point)))
+     (end-of-line 0)
+     (should-not (nth 2 (python-shell-completion-at-point))))))
+
+(ert-deftest python-shell-completion-at-point-native-1 ()
+  (skip-unless (executable-find python-tests-shell-interpreter))
+  (python-tests-with-temp-buffer-with-shell
+   ""
+   (python-shell-completion-native-turn-on)
+   (python-shell-with-shell-buffer
+     (insert "import abc")
+     (comint-send-input)
+     (python-tests-shell-wait-for-prompt)
+     (insert "abc.")
+     (should (nth 2 (python-shell-completion-at-point)))
+     (end-of-line 0)
+     (should-not (nth 2 (python-shell-completion-at-point))))))
+
+
+\f
+;;; PDB Track integration
+
+\f
+;;; Symbol completion
+
+(ert-deftest python-completion-at-point-1 ()
   (skip-unless (executable-find python-tests-shell-interpreter))
   (python-tests-with-temp-buffer-with-shell
    "
@@ -4411,7 +4445,7 @@ import abc
      (insert "A")
      (should (completion-at-point)))))
 
-(ert-deftest python-shell-completion-2 ()
+(ert-deftest python-completion-at-point-2 ()
   "Should work regardless of the point in the Shell buffer."
   (skip-unless (executable-find python-tests-shell-interpreter))
   (python-tests-with-temp-buffer-with-shell
@@ -4427,7 +4461,7 @@ import abc
      (insert "abc.")
      (should (completion-at-point)))))
 
-(ert-deftest python-shell-completion-pdb-1 ()
+(ert-deftest python-completion-at-point-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
@@ -4444,7 +4478,7 @@ print('Hello')
      (insert "u")
      (should-not (nth 2 (python-completion-at-point))))))
 
-(ert-deftest python-shell-completion-native-1 ()
+(ert-deftest python-completion-at-point-native-1 ()
   (skip-unless (executable-find python-tests-shell-interpreter))
   (python-tests-with-temp-buffer-with-shell
    "
@@ -4460,7 +4494,7 @@ import abc
      (insert "A")
      (should (completion-at-point)))))
 
-(ert-deftest python-shell-completion-native-2 ()
+(ert-deftest python-completion-at-point-native-2 ()
   "Should work regardless of the point in the Shell buffer."
   (skip-unless (executable-find python-tests-shell-interpreter))
   (python-tests-with-temp-buffer-with-shell
@@ -4477,7 +4511,7 @@ import abc
      (insert "abc.")
      (should (completion-at-point)))))
 
-(ert-deftest python-shell-completion-native-with-ffap-1 ()
+(ert-deftest python-completion-at-point-native-with-ffap-1 ()
   (skip-unless (executable-find python-tests-shell-interpreter))
   (python-tests-with-temp-buffer-with-shell
    "
@@ -4493,7 +4527,7 @@ import abc
      (python-ffap-module-path "abc.")
      (should (completion-at-point)))))
 
-(ert-deftest python-shell-completion-native-with-eldoc-1 ()
+(ert-deftest python-completion-at-point-native-with-eldoc-1 ()
   (skip-unless (executable-find python-tests-shell-interpreter))
   (python-tests-with-temp-buffer-with-shell
    "
@@ -4509,40 +4543,6 @@ import abc
      (python-eldoc-function)
      (should (completion-at-point)))))
 
-(ert-deftest python-shell-completion-shell-buffer-1 ()
-  (skip-unless (executable-find python-tests-shell-interpreter))
-  (python-tests-with-temp-buffer-with-shell
-   ""
-   (python-shell-with-shell-buffer
-     (insert "import abc")
-     (comint-send-input)
-     (python-tests-shell-wait-for-prompt)
-     (insert "abc.")
-     (should (nth 2 (python-shell-completion-at-point)))
-     (end-of-line 0)
-     (should-not (nth 2 (python-shell-completion-at-point))))))
-
-(ert-deftest python-shell-completion-shell-buffer-native-1 ()
-  (skip-unless (executable-find python-tests-shell-interpreter))
-  (python-tests-with-temp-buffer-with-shell
-   ""
-   (python-shell-completion-native-turn-on)
-   (python-shell-with-shell-buffer
-     (insert "import abc")
-     (comint-send-input)
-     (python-tests-shell-wait-for-prompt)
-     (insert "abc.")
-     (should (nth 2 (python-shell-completion-at-point)))
-     (end-of-line 0)
-     (should-not (nth 2 (python-shell-completion-at-point))))))
-
-
-\f
-;;; PDB Track integration
-
-\f
-;;; Symbol completion
-
 \f
 ;;; Fill paragraph