From e23de7d63a690795e77f52ffb8dbf72765ab8be7 Mon Sep 17 00:00:00 2001
From: kobarity <kobarity@gmail.com>
Date: Sun, 16 Oct 2022 21:46:16 +0900
Subject: [PATCH] Move and rename Python completion ERTs

* 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.
---
 test/lisp/progmodes/python-tests.el | 82 ++++++++++++++---------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index 71bd0e0d68..81c9217c62 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -4396,7 +4396,41 @@ python-shell-completion-native-interpreter-disabled-p-1
          (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))))))
+
+
+
+;;; PDB Track integration
+
+
+;;; 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 @@ python-shell-completion-1
      (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 @@ python-shell-completion-2
      (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 @@ python-shell-completion-pdb-1
      (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 @@ python-shell-completion-native-1
      (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 @@ python-shell-completion-native-2
      (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 @@ python-shell-completion-native-with-ffap-1
      (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 @@ python-shell-completion-native-with-eldoc-1
      (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))))))
-
-
-
-;;; PDB Track integration
-
-
-;;; Symbol completion
-
 
 ;;; Fill paragraph
 
-- 
2.34.1

