From d7377c6f0f3917369b465141a9f06e9dab04d34b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 28 May 2024 17:48:37 +0200 Subject: [PATCH] Use same Python binary for test as in python mode (bug#70815) * test/lisp/progmodes/python-tests.el (python-tests-get-shell-interpreter): Try Python executable names in the same order as we do for `python-shell-interpreter`, so that we run the test with the one is most likely to be used. (cherry picked from commit 9c7de10079bb5f803a1744ae1d56399ad7d42ac5) --- test/lisp/progmodes/python-tests.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 2494e80ebc0..171df86a461 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -3729,7 +3729,9 @@ If env string EMACS_PYTHON_INTERPRETER exists, use it as preferred one." (or (executable-find interpreter) (error "Couldn't find EMACS_PYTHON_INTERPRETER(%s) in path" interpreter))) - (cl-some #'executable-find '("python" "python3" "python2")))))) + ;; Use the same order as for the default value of + ;; `python-shell-interpreter'. + (cl-some #'executable-find '("python3" "python" "python2")))))) (ert-deftest python-shell-get-process-name-1 () "Check process name calculation sans `buffer-file-name'." -- 2.39.2