summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/python-tests.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2020-04-28 13:54:00 +0200
committerStefan Kangas <stefankangas@gmail.com>2020-04-28 13:54:00 +0200
commit771a6b68165b986b6bf9249c57ca11d310b0f0e4 (patch)
treee28a8c72064a8b867d9d97461e57dc99ed22219d /test/lisp/progmodes/python-tests.el
parent725256d0030aa72617dc8963e7582e53f9e02674 (diff)
downloademacs-771a6b68165b986b6bf9249c57ca11d310b0f0e4.tar.gz
Use lexical-binding in most progmodes tests
* test/lisp/progmodes/etags-tests.el: * test/lisp/progmodes/f90-tests.el: * test/lisp/progmodes/ps-mode-tests.el: * test/lisp/progmodes/python-tests.el: * test/lisp/progmodes/ruby-mode-tests.el: * test/lisp/progmodes/subword-tests.el: * test/lisp/progmodes/tcl-tests.el: * test/lisp/progmodes/xref-tests.el: Use lexical-binding. * test/lisp/progmodes/python-tests.el (python-tests-visible-string) (python-tests-look-at-1, python-tests-look-at-2) (python-shell-calculate-process-environment-2): Silence byte-compiler.
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
-rw-r--r--test/lisp/progmodes/python-tests.el11
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 @@
-;;; python-tests.el --- Test suite for python.el
+;;; python-tests.el --- Test suite for python.el -*- lexical-binding:t -*-
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
@@ -118,7 +118,6 @@ Argument MIN and MAX delimit the region to be returned and
default to `point-min' and `point-max' respectively."
(let* ((min (or min (point-min)))
(max (or max (point-max)))
- (buffer (current-buffer))
(buffer-contents (buffer-substring-no-properties min max))
(overlays
(sort (overlays-in min max)
@@ -154,7 +153,7 @@ The name of this directory depends on `system-type'."
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua."
(let ((expected (save-excursion
- (dotimes (i 3)
+ (dotimes (_ 3)
(re-search-forward "et" nil t))
(forward-char -2)
(point))))
@@ -163,7 +162,7 @@ aliqua."
;; one should be returned.
(should (= (python-tests-look-at "et" 6 t) expected))
;; If already looking at STRING, it should skip it.
- (dotimes (i 2) (re-search-forward "et"))
+ (dotimes (_ 2) (re-search-forward "et"))
(forward-char -2)
(should (= (python-tests-look-at "et") expected)))))
@@ -178,7 +177,7 @@ aliqua."
(re-search-forward "et" nil t)
(forward-char -2)
(point))))
- (dotimes (i 3)
+ (dotimes (_ 3)
(re-search-forward "et" nil t))
(should (= (python-tests-look-at "et" -3 t) expected))
(should (= (python-tests-look-at "et" -6 t) expected)))))
@@ -2642,7 +2641,7 @@ if x:
(ert-deftest python-shell-calculate-process-environment-2 ()
"Test `python-shell-extra-pythonpaths' modification."
(let* ((process-environment process-environment)
- (original-pythonpath (setenv "PYTHONPATH" "/path0"))
+ (_original-pythonpath (setenv "PYTHONPATH" "/path0"))
(python-shell-extra-pythonpaths '("/path1" "/path2"))
(process-environment (python-shell-calculate-process-environment)))
(should (equal (getenv "PYTHONPATH")