diff options
| author | kobarity | 2022-10-16 15:26:29 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-10-16 15:26:49 +0200 |
| commit | 0e5fc2345d8ec72fd8f7ad51ce1e42040e0e91da (patch) | |
| tree | a02701208d94d9754d106c2fa92382aba224d050 /test/lisp/progmodes/python-tests.el | |
| parent | 494ccec94ede12a56c9fb2393a3c75260b8638a7 (diff) | |
| download | emacs-0e5fc2345d8ec72fd8f7ad51ce1e42040e0e91da.tar.gz emacs-0e5fc2345d8ec72fd8f7ad51ce1e42040e0e91da.zip | |
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
(bug#58565).
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 71bd0e0d682..81c9217c62c 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -4396,7 +4396,41 @@ def foo(): | |||
| 4396 | (python-shell-interpreter "/some/path/to/bin/pypy")) | 4396 | (python-shell-interpreter "/some/path/to/bin/pypy")) |
| 4397 | (should (python-shell-completion-native-interpreter-disabled-p)))) | 4397 | (should (python-shell-completion-native-interpreter-disabled-p)))) |
| 4398 | 4398 | ||
| 4399 | (ert-deftest python-shell-completion-1 () | 4399 | (ert-deftest python-shell-completion-at-point-1 () |
| 4400 | (skip-unless (executable-find python-tests-shell-interpreter)) | ||
| 4401 | (python-tests-with-temp-buffer-with-shell | ||
| 4402 | "" | ||
| 4403 | (python-shell-with-shell-buffer | ||
| 4404 | (insert "import abc") | ||
| 4405 | (comint-send-input) | ||
| 4406 | (python-tests-shell-wait-for-prompt) | ||
| 4407 | (insert "abc.") | ||
| 4408 | (should (nth 2 (python-shell-completion-at-point))) | ||
| 4409 | (end-of-line 0) | ||
| 4410 | (should-not (nth 2 (python-shell-completion-at-point)))))) | ||
| 4411 | |||
| 4412 | (ert-deftest python-shell-completion-at-point-native-1 () | ||
| 4413 | (skip-unless (executable-find python-tests-shell-interpreter)) | ||
| 4414 | (python-tests-with-temp-buffer-with-shell | ||
| 4415 | "" | ||
| 4416 | (python-shell-completion-native-turn-on) | ||
| 4417 | (python-shell-with-shell-buffer | ||
| 4418 | (insert "import abc") | ||
| 4419 | (comint-send-input) | ||
| 4420 | (python-tests-shell-wait-for-prompt) | ||
| 4421 | (insert "abc.") | ||
| 4422 | (should (nth 2 (python-shell-completion-at-point))) | ||
| 4423 | (end-of-line 0) | ||
| 4424 | (should-not (nth 2 (python-shell-completion-at-point)))))) | ||
| 4425 | |||
| 4426 | |||
| 4427 | |||
| 4428 | ;;; PDB Track integration | ||
| 4429 | |||
| 4430 | |||
| 4431 | ;;; Symbol completion | ||
| 4432 | |||
| 4433 | (ert-deftest python-completion-at-point-1 () | ||
| 4400 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4434 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4401 | (python-tests-with-temp-buffer-with-shell | 4435 | (python-tests-with-temp-buffer-with-shell |
| 4402 | " | 4436 | " |
| @@ -4411,7 +4445,7 @@ import abc | |||
| 4411 | (insert "A") | 4445 | (insert "A") |
| 4412 | (should (completion-at-point))))) | 4446 | (should (completion-at-point))))) |
| 4413 | 4447 | ||
| 4414 | (ert-deftest python-shell-completion-2 () | 4448 | (ert-deftest python-completion-at-point-2 () |
| 4415 | "Should work regardless of the point in the Shell buffer." | 4449 | "Should work regardless of the point in the Shell buffer." |
| 4416 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4450 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4417 | (python-tests-with-temp-buffer-with-shell | 4451 | (python-tests-with-temp-buffer-with-shell |
| @@ -4427,7 +4461,7 @@ import abc | |||
| 4427 | (insert "abc.") | 4461 | (insert "abc.") |
| 4428 | (should (completion-at-point))))) | 4462 | (should (completion-at-point))))) |
| 4429 | 4463 | ||
| 4430 | (ert-deftest python-shell-completion-pdb-1 () | 4464 | (ert-deftest python-completion-at-point-pdb-1 () |
| 4431 | "Should not complete PDB commands in Python buffer." | 4465 | "Should not complete PDB commands in Python buffer." |
| 4432 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4466 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4433 | (python-tests-with-temp-buffer-with-shell | 4467 | (python-tests-with-temp-buffer-with-shell |
| @@ -4444,7 +4478,7 @@ print('Hello') | |||
| 4444 | (insert "u") | 4478 | (insert "u") |
| 4445 | (should-not (nth 2 (python-completion-at-point)))))) | 4479 | (should-not (nth 2 (python-completion-at-point)))))) |
| 4446 | 4480 | ||
| 4447 | (ert-deftest python-shell-completion-native-1 () | 4481 | (ert-deftest python-completion-at-point-native-1 () |
| 4448 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4482 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4449 | (python-tests-with-temp-buffer-with-shell | 4483 | (python-tests-with-temp-buffer-with-shell |
| 4450 | " | 4484 | " |
| @@ -4460,7 +4494,7 @@ import abc | |||
| 4460 | (insert "A") | 4494 | (insert "A") |
| 4461 | (should (completion-at-point))))) | 4495 | (should (completion-at-point))))) |
| 4462 | 4496 | ||
| 4463 | (ert-deftest python-shell-completion-native-2 () | 4497 | (ert-deftest python-completion-at-point-native-2 () |
| 4464 | "Should work regardless of the point in the Shell buffer." | 4498 | "Should work regardless of the point in the Shell buffer." |
| 4465 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4499 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4466 | (python-tests-with-temp-buffer-with-shell | 4500 | (python-tests-with-temp-buffer-with-shell |
| @@ -4477,7 +4511,7 @@ import abc | |||
| 4477 | (insert "abc.") | 4511 | (insert "abc.") |
| 4478 | (should (completion-at-point))))) | 4512 | (should (completion-at-point))))) |
| 4479 | 4513 | ||
| 4480 | (ert-deftest python-shell-completion-native-with-ffap-1 () | 4514 | (ert-deftest python-completion-at-point-native-with-ffap-1 () |
| 4481 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4515 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4482 | (python-tests-with-temp-buffer-with-shell | 4516 | (python-tests-with-temp-buffer-with-shell |
| 4483 | " | 4517 | " |
| @@ -4493,7 +4527,7 @@ import abc | |||
| 4493 | (python-ffap-module-path "abc.") | 4527 | (python-ffap-module-path "abc.") |
| 4494 | (should (completion-at-point))))) | 4528 | (should (completion-at-point))))) |
| 4495 | 4529 | ||
| 4496 | (ert-deftest python-shell-completion-native-with-eldoc-1 () | 4530 | (ert-deftest python-completion-at-point-native-with-eldoc-1 () |
| 4497 | (skip-unless (executable-find python-tests-shell-interpreter)) | 4531 | (skip-unless (executable-find python-tests-shell-interpreter)) |
| 4498 | (python-tests-with-temp-buffer-with-shell | 4532 | (python-tests-with-temp-buffer-with-shell |
| 4499 | " | 4533 | " |
| @@ -4509,40 +4543,6 @@ import abc | |||
| 4509 | (python-eldoc-function) | 4543 | (python-eldoc-function) |
| 4510 | (should (completion-at-point))))) | 4544 | (should (completion-at-point))))) |
| 4511 | 4545 | ||
| 4512 | (ert-deftest python-shell-completion-shell-buffer-1 () | ||
| 4513 | (skip-unless (executable-find python-tests-shell-interpreter)) | ||
| 4514 | (python-tests-with-temp-buffer-with-shell | ||
| 4515 | "" | ||
| 4516 | (python-shell-with-shell-buffer | ||
| 4517 | (insert "import abc") | ||
| 4518 | (comint-send-input) | ||
| 4519 | (python-tests-shell-wait-for-prompt) | ||
| 4520 | (insert "abc.") | ||
| 4521 | (should (nth 2 (python-shell-completion-at-point))) | ||
| 4522 | (end-of-line 0) | ||
| 4523 | (should-not (nth 2 (python-shell-completion-at-point)))))) | ||
| 4524 | |||
| 4525 | (ert-deftest python-shell-completion-shell-buffer-native-1 () | ||
| 4526 | (skip-unless (executable-find python-tests-shell-interpreter)) | ||
| 4527 | (python-tests-with-temp-buffer-with-shell | ||
| 4528 | "" | ||
| 4529 | (python-shell-completion-native-turn-on) | ||
| 4530 | (python-shell-with-shell-buffer | ||
| 4531 | (insert "import abc") | ||
| 4532 | (comint-send-input) | ||
| 4533 | (python-tests-shell-wait-for-prompt) | ||
| 4534 | (insert "abc.") | ||
| 4535 | (should (nth 2 (python-shell-completion-at-point))) | ||
| 4536 | (end-of-line 0) | ||
| 4537 | (should-not (nth 2 (python-shell-completion-at-point)))))) | ||
| 4538 | |||
| 4539 | |||
| 4540 | |||
| 4541 | ;;; PDB Track integration | ||
| 4542 | |||
| 4543 | |||
| 4544 | ;;; Symbol completion | ||
| 4545 | |||
| 4546 | 4546 | ||
| 4547 | ;;; Fill paragraph | 4547 | ;;; Fill paragraph |
| 4548 | 4548 | ||