Subject: bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python interpreters

From: Mattias Engdegård <[email-masked]>
Date: Sun, 26 May 2024 17:24:26 +0200

26 maj 2024 kl. 17.00 skrev kobarity <[email-masked]>:

> Please try evaluating the following expression in the Python buffer
> after invoking Inferior Python buffer running Python 2.
> 
> (python-shell-send-string-no-output "print('a')")

The result is "a".

> My point is that we cannot assure that Python 2 is not selected.  One
> example is EMACS_PYTHON_INTERPRETER environment variable introduced by
> the patch.  It can specify the interpreter used in ERTs.  So a Mac
> user may set EMACS_PYTHON_INTERPRETER to "python".

Fair enough. I take no great interest in making the tests pass with such an environment variable assignment; at the very minimum, they should pass in the default configuration.

> So I think we need some
> mechanism to skip test based on the interpreter version and the
> platform.

Time permitting, I will be happy to run instrumented test runs if it would help you find out exactly why the test fail with Python 2.