diff options
| author | Jin Choi | 2022-04-30 13:34:57 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-04-30 13:38:18 +0200 |
| commit | 5a10e6377c2b97420e5617f114bb374d67ec1a58 (patch) | |
| tree | 6fecc12d7767ca06978f94897cfe2812ca859ea4 /test/lisp/progmodes/python-tests.el | |
| parent | 2a2b3f583430df8495b566a1dfb1f41c4d61292f (diff) | |
| download | emacs-5a10e6377c2b97420e5617f114bb374d67ec1a58.tar.gz emacs-5a10e6377c2b97420e5617f114bb374d67ec1a58.zip | |
Make Python evaluation work more reliably
* lisp/progmodes/python.el (python-shell-buffer-substring): Make
more regions valid Python code (bug#55174).
Copyright-paperwork-exempt: yes
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 1a6a7dc176d..01b233cc425 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -3503,10 +3503,7 @@ def foo(): | |||
| 3503 | (should (string= (python-shell-buffer-substring | 3503 | (should (string= (python-shell-buffer-substring |
| 3504 | (python-tests-look-at "print ('a')") | 3504 | (python-tests-look-at "print ('a')") |
| 3505 | (point-max)) | 3505 | (point-max)) |
| 3506 | "if True: | 3506 | "# -*- coding: utf-8 -*-\nif True:\n print ('a')\n\n")))) |
| 3507 | |||
| 3508 | print ('a') | ||
| 3509 | ")))) | ||
| 3510 | 3507 | ||
| 3511 | (ert-deftest python-shell-buffer-substring-11 () | 3508 | (ert-deftest python-shell-buffer-substring-11 () |
| 3512 | "Check substring from partial block and point within indentation." | 3509 | "Check substring from partial block and point within indentation." |
| @@ -3521,10 +3518,7 @@ def foo(): | |||
| 3521 | (backward-char 1) | 3518 | (backward-char 1) |
| 3522 | (point)) | 3519 | (point)) |
| 3523 | (point-max)) | 3520 | (point-max)) |
| 3524 | "if True: | 3521 | "# -*- coding: utf-8 -*-\nif True:\n print ('a')\n\n")))) |
| 3525 | |||
| 3526 | print ('a') | ||
| 3527 | ")))) | ||
| 3528 | 3522 | ||
| 3529 | (ert-deftest python-shell-buffer-substring-12 () | 3523 | (ert-deftest python-shell-buffer-substring-12 () |
| 3530 | "Check substring from partial block and point in whitespace." | 3524 | "Check substring from partial block and point in whitespace." |
| @@ -3539,13 +3533,7 @@ def foo(): | |||
| 3539 | (should (string= (python-shell-buffer-substring | 3533 | (should (string= (python-shell-buffer-substring |
| 3540 | (python-tests-look-at "# Whitespace") | 3534 | (python-tests-look-at "# Whitespace") |
| 3541 | (point-max)) | 3535 | (point-max)) |
| 3542 | "if True: | 3536 | "# -*- coding: utf-8 -*-\n\nif True:\n # Whitespace\n\n print ('a')\n\n")))) |
| 3543 | |||
| 3544 | |||
| 3545 | # Whitespace | ||
| 3546 | |||
| 3547 | print ('a') | ||
| 3548 | ")))) | ||
| 3549 | 3537 | ||
| 3550 | 3538 | ||
| 3551 | 3539 | ||