diff options
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 65a60b4c32c..60cd6ea996e 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; python-tests.el --- Test suite for python.el | 1 | ;;; python-tests.el --- Test suite for python.el -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -118,7 +118,6 @@ Argument MIN and MAX delimit the region to be returned and | |||
| 118 | default to `point-min' and `point-max' respectively." | 118 | default to `point-min' and `point-max' respectively." |
| 119 | (let* ((min (or min (point-min))) | 119 | (let* ((min (or min (point-min))) |
| 120 | (max (or max (point-max))) | 120 | (max (or max (point-max))) |
| 121 | (buffer (current-buffer)) | ||
| 122 | (buffer-contents (buffer-substring-no-properties min max)) | 121 | (buffer-contents (buffer-substring-no-properties min max)) |
| 123 | (overlays | 122 | (overlays |
| 124 | (sort (overlays-in min max) | 123 | (sort (overlays-in min max) |
| @@ -154,7 +153,7 @@ The name of this directory depends on `system-type'." | |||
| 154 | sed do eiusmod tempor incididunt ut labore et dolore magna | 153 | sed do eiusmod tempor incididunt ut labore et dolore magna |
| 155 | aliqua." | 154 | aliqua." |
| 156 | (let ((expected (save-excursion | 155 | (let ((expected (save-excursion |
| 157 | (dotimes (i 3) | 156 | (dotimes (_ 3) |
| 158 | (re-search-forward "et" nil t)) | 157 | (re-search-forward "et" nil t)) |
| 159 | (forward-char -2) | 158 | (forward-char -2) |
| 160 | (point)))) | 159 | (point)))) |
| @@ -163,7 +162,7 @@ aliqua." | |||
| 163 | ;; one should be returned. | 162 | ;; one should be returned. |
| 164 | (should (= (python-tests-look-at "et" 6 t) expected)) | 163 | (should (= (python-tests-look-at "et" 6 t) expected)) |
| 165 | ;; If already looking at STRING, it should skip it. | 164 | ;; If already looking at STRING, it should skip it. |
| 166 | (dotimes (i 2) (re-search-forward "et")) | 165 | (dotimes (_ 2) (re-search-forward "et")) |
| 167 | (forward-char -2) | 166 | (forward-char -2) |
| 168 | (should (= (python-tests-look-at "et") expected))))) | 167 | (should (= (python-tests-look-at "et") expected))))) |
| 169 | 168 | ||
| @@ -178,7 +177,7 @@ aliqua." | |||
| 178 | (re-search-forward "et" nil t) | 177 | (re-search-forward "et" nil t) |
| 179 | (forward-char -2) | 178 | (forward-char -2) |
| 180 | (point)))) | 179 | (point)))) |
| 181 | (dotimes (i 3) | 180 | (dotimes (_ 3) |
| 182 | (re-search-forward "et" nil t)) | 181 | (re-search-forward "et" nil t)) |
| 183 | (should (= (python-tests-look-at "et" -3 t) expected)) | 182 | (should (= (python-tests-look-at "et" -3 t) expected)) |
| 184 | (should (= (python-tests-look-at "et" -6 t) expected))))) | 183 | (should (= (python-tests-look-at "et" -6 t) expected))))) |
| @@ -2642,7 +2641,7 @@ if x: | |||
| 2642 | (ert-deftest python-shell-calculate-process-environment-2 () | 2641 | (ert-deftest python-shell-calculate-process-environment-2 () |
| 2643 | "Test `python-shell-extra-pythonpaths' modification." | 2642 | "Test `python-shell-extra-pythonpaths' modification." |
| 2644 | (let* ((process-environment process-environment) | 2643 | (let* ((process-environment process-environment) |
| 2645 | (original-pythonpath (setenv "PYTHONPATH" "/path0")) | 2644 | (_original-pythonpath (setenv "PYTHONPATH" "/path0")) |
| 2646 | (python-shell-extra-pythonpaths '("/path1" "/path2")) | 2645 | (python-shell-extra-pythonpaths '("/path1" "/path2")) |
| 2647 | (process-environment (python-shell-calculate-process-environment))) | 2646 | (process-environment (python-shell-calculate-process-environment))) |
| 2648 | (should (equal (getenv "PYTHONPATH") | 2647 | (should (equal (getenv "PYTHONPATH") |