unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: kobarity <kobarity@gmail.com>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: Yuan Fu <casouri@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	59477@debbugs.gnu.org
Subject: bug#59477: python-tests fail without tree-sitter
Date: Tue, 29 Nov 2022 00:18:10 +0900	[thread overview]
Message-ID: <eke7wn7f85vx.wl-kobarity@gmail.com> (raw)
In-Reply-To: <C55D8A3D-3FC8-4A27-A029-B5B5F6009D5F@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2195 bytes --]


Mattias Engdegård wrote:
> > 1. emacs -Q
> > 2. Open Python file. (Empty file is OK)
> > 3. C-c C-p (M-x run-python)
> > 4. C-x o (Back to the Python mode buffer)
> > 5. M-: (python-shell-send-string-no-output "print('a')")
> > 
> > My expectation is "a".
> 
> The result here is
> 
>  "__PYTHON_EL_eval(\"print('a')\", \"/Users/mattias/emacs/asdf.py\")\r\na"
> 
> which is consistent with the test failure -- something in python-mode is having trouble parsing the reply. I traced `python-shell-output-filter`; see attached file.
> 
> This might be bug#25753 again (via a comment in etc/PROBLEMS). Even if no effort is made to fix the bug properly, we should make sure the test doesn't fail.

Thank you for the logs and letting me know about bug#25753.  It seems
to be a bug that has existed for some time on Mac.  Here is the trace
on my Ubuntu.

======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "python.el: native completion setup loaded\n")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "a\n")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""

As for `python-ffap-module-path-1', it assumes that
`python-ffap-module-path' and its underlying
`python-shell-send-string-no-output' operate correctly.  So I think
the first option is to mark as an expected failure on Mac as the
attached patch.  However, I'm not sure if it fails on all Macs.
Another option may be to add :unstable tag.  Which do you think is
better?


[-- Attachment #2: 0001-Mark-python-ffap-module-path-1-as-an-expected-failur.patch --]
[-- Type: application/octet-stream, Size: 945 bytes --]

From b560b9744d6db7d0107a16699c95c91a7a4d6efc Mon Sep 17 00:00:00 2001
From: kobarity <kobarity@gmail.com>
Date: Tue, 29 Nov 2022 00:05:23 +0900
Subject: [PATCH] Mark python-ffap-module-path-1 as an expected failure on Mac

* test/lisp/progmodes/python-tests.el (python-ffap-module-path-1):
Mark as an expected failure on Mac. (Bug#59477)
---
 test/lisp/progmodes/python-tests.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index f871b7bc7d..2bfaa33634 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -4565,6 +4565,7 @@ python-completion-at-point-native-with-eldoc-1
 ;;; FFAP
 
 (ert-deftest python-ffap-module-path-1 ()
+  :expected-result (if (eq system-type 'darwin) :failed :passed)
   (skip-unless (executable-find python-tests-shell-interpreter))
   (python-tests-with-temp-buffer-with-shell
    "
-- 
2.34.1


  reply	other threads:[~2022-11-28 15:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 10:13 bug#59477: python-tests fail without tree-sitter Mattias Engdegård
2022-11-23  2:40 ` Yuan Fu
2022-11-23 22:00 ` Yuan Fu
2022-11-24  6:45   ` Eli Zaretskii
2022-11-25 16:50 ` Mattias Engdegård
2022-11-26 22:18   ` Yuan Fu
2022-11-27 13:07     ` Mattias Engdegård
2022-11-30 13:41       ` Mattias Engdegård
2022-12-04  7:51         ` Yuan Fu
2022-11-27 13:16     ` Mattias Engdegård
2022-11-27 14:48       ` kobarity
2022-11-28 10:01         ` Mattias Engdegård
2022-11-28 15:18           ` kobarity [this message]
2022-11-28 19:22             ` Mattias Engdegård
2022-11-28 10:18         ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eke7wn7f85vx.wl-kobarity@gmail.com \
    --to=kobarity@gmail.com \
    --cc=59477@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=mattias.engdegard@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).