Subject: Re: bug#21376: 25.0.50; Python tests fail on MS-Windows -- issues with the prompt

From: Noam Postavsky <[email-masked]>
Date: Wed, 16 Aug 2017 12:59:45 -0400

On Wed, Aug 16, 2017 at 12:38 PM, Eli Zaretskii <[email-masked]> wrote:
>>     Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40)
>>       [MSC v.1500 64 bit (AMD64)] on win32
>>     Type "help", "copyright", "credits" or "license" for more information.
>>     >>>   File "<stdin>", line 1
>>         print('hello world')^M
>>                             ^
>>     SyntaxError: invalid syntax
>>     >>>
>>
>
> Same here, except that Python version is 2.6.6.  Also, I needed to
> replace "python2" with an explicit absolute file name of python.exe,
> as I don't have "python2" here and Python is not on PATH.  But I don't
> believe these differences are important, are they?

Yes, I've been messing around with PATH and bouncing between Python 2
and 3. Anyway, it sounds like your version of Python has the exact
same issue. Two questions:

Is it possible you didn't recompile python.elc after applying the patch?

How does the test run at all if you don't have Python on PATH?

python-tests.el has:

    (defvar python-tests-shell-interpreter "python")
    ...
    (ert-deftest python-shell-calculate-command-1 ()
      "Check the command to execute is calculated correctly.
    Using `python-shell-interpreter' and
    `python-shell-interpreter-args'."
      (skip-unless (executable-find python-tests-shell-interpreter))