unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Yuan Fu <casouri@gmail.com>
Cc: kobarity <kobarity@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	59477@debbugs.gnu.org
Subject: bug#59477: python-tests fail without tree-sitter
Date: Sun, 27 Nov 2022 14:16:14 +0100	[thread overview]
Message-ID: <0AAD0494-CF2D-4AE1-B939-4C610CC4018A@gmail.com> (raw)
In-Reply-To: <FC02DCBA-26AA-41EF-A62C-B93C2FB7CF2D@gmail.com>

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

Oh, there is one more test in python-tests that fails (on my Mac at least): `python-ffap-module-path-1`. It was added fairly recently (see bug#58713) so I'm not sure it was already broken at the time or if that is a recent change. CC:ing the author and attaching the test log.


[-- Attachment #2: python-ffap-module-path-1.log --]
[-- Type: application/octet-stream, Size: 2774 bytes --]

Test python-ffap-module-path-1 backtrace:
  signal(ert-test-failed (((should (file-exists-p (python-ffap-module-
  ert-fail(((should (file-exists-p (python-ffap-module-path "abc"))) :
  (if (unwind-protect (setq value-3262 (apply fn-3260 args-3261)) (set
  (let (form-description-3264) (if (unwind-protect (setq value-3262 (a
  (let ((value-3262 'ert-form-evaluation-aborted-3263)) (let (form-des
  (let* ((fn-3260 #'file-exists-p) (args-3261 (condition-case err (let
  (let ((inhibit-message t)) (python-shell-send-buffer) (python-tests-
  (progn (run-python nil t) (insert "\nimport abc\n") (goto-char (poin
  (unwind-protect (progn (run-python nil t) (insert "\nimport abc\n") 
  (let ((python-indent-guess-indent-offset nil) (python-shell-completi
  (progn (let ((python-indent-guess-indent-offset nil) (python-shell-c
  (unwind-protect (progn (let ((python-indent-guess-indent-offset nil)
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
  (closure (t) nil (let* ((fn-3255 #'executable-find) (args-3256 (cond
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-ffap-module-path-1 :documentat
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":../../emacs/test" "-l" "ert" "-l" "lisp/progm
  command-line()
  normal-top-level()
Test python-ffap-module-path-1 condition:
    (ert-test-failed
     ((should
       (file-exists-p
	(python-ffap-module-path "abc")))
      :form
      (file-exists-p "__PYTHON_EL_eval(\"\\ndef __FFAP_get_module_path(objstr):\\n    try:\\n        import inspect\\n        import os.path\\n        # NameError exceptions are delayed until this point.\\n        obj = eval(objstr)\\n        module = inspect.getmodule(obj)\\n        filename = module.__file__\\n        ext = os.path.splitext(filename)[1]\\n        if ext in ('.pyc', '.pyo'):\\n            # Point to the source file.\\n            filename = filename[:-1]\\n        if os.path.exists(filename):\\n            return filename\\n        return ''\\n    except:\\n        return ''\\nprint(__FFAP_get_module_path(\\\"abc\\\"))\", \"<string>\")\15\n/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/abc.py")
      :value nil))
   FAILED   18/312  python-ffap-module-path-1 (0.405063 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:4567

[-- Attachment #3: Type: text/plain, Size: 284 bytes --]



This looks like an error when parsing output from Python, mistaking input for output.

(How we ended up parsing a buffer containing both input, output and prompts intermingled is anyone's guess -- it doesn't look like a very reliable way of doing it, and evidently isn't.)



  parent reply	other threads:[~2022-11-27 13:16 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 [this message]
2022-11-27 14:48       ` kobarity
2022-11-28 10:01         ` Mattias Engdegård
2022-11-28 15:18           ` kobarity
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=0AAD0494-CF2D-4AE1-B939-4C610CC4018A@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=59477@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=kobarity@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).