unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59477: python-tests fail without tree-sitter
@ 2022-11-22 10:13 Mattias Engdegård
  2022-11-23  2:40 ` Yuan Fu
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-22 10:13 UTC (permalink / raw)
  To: 59477; +Cc: Yuan Fu

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

The python-tests fail when Emacs is built without tree-sitter:


[-- Attachment #2: python-tests.log --]
[-- Type: application/octet-stream, Size: 43269 bytes --]

-*- mode: compilation; default-directory: "~/emacs/test/src/" -*-
Compilation started at Tue Nov 22 11:07:47

make -C ~/bem/test python-tests
  GEN      lisp/progmodes/python-tests.log
Running 312 tests (2022-11-22 11:07:48+0100, selector `(not (or (tag :unstable) (tag :nativecomp)))')
   passed    1/312  python-auto-fill-docstring (0.000995 sec)
Fontifying  *temp*-976010...
Fontifying  *temp*-976010... (syntactically...)
Fontifying  *temp*-976010... (regexps...)
Fontifying  *temp*-976010... (regexps....)
Fontifying  *temp*-976010... (regexps.....)
Fontifying  *temp*-976010... (regexps......)
Fontifying  *temp*-976010... (regexps.......)
Fontifying  *temp*-976010... (regexps........)
Fontifying  *temp*-976010... (regexps.........)
Fontifying  *temp*-976010... (regexps..........)
Fontifying  *temp*-976010... (regexps...........)
Fontifying  *temp*-976010... (regexps............)
Fontifying  *temp*-976010... (regexps.............)
Fontifying  *temp*-976010... (regexps..............)
Fontifying  *temp*-976010... (regexps...............)

   passed    2/312  python-bob-infloop-avoid (0.000769 sec)
   passed    3/312  python-completion-at-point-1 (0.384923 sec)
   passed    4/312  python-completion-at-point-2 (0.365147 sec)
   passed    5/312  python-completion-at-point-native-1 (0.406005 sec)
   passed    6/312  python-completion-at-point-native-2 (0.397249 sec)
   passed    7/312  python-completion-at-point-native-with-eldoc-1 (0.444167 sec)
   passed    8/312  python-completion-at-point-native-with-ffap-1 (0.438913 sec)
   passed    9/312  python-completion-at-point-pdb-1 (0.506191 sec)
   passed   10/312  python-completion-at-point-while-running-1 (0.204379 sec)
   passed   11/312  python-eldoc--get-doc-at-point-1 (0.416498 sec)
   passed   12/312  python-eldoc--get-doc-at-point-while-running-1 (0.197064 sec)
   passed   13/312  python-eldoc--get-symbol-at-point-1 (0.001490 sec)
   passed   14/312  python-eldoc--get-symbol-at-point-2 (0.001449 sec)
   passed   15/312  python-eldoc--get-symbol-at-point-3 (0.000386 sec)
   passed   16/312  python-eldoc--get-symbol-at-point-4 (0.000401 sec)
   passed   17/312  python-end-of-defun-1 (0.000681 sec)
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.410108 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:4567
   passed   19/312  python-ffap-module-path-while-running-1 (0.203974 sec)
   passed   20/312  python-fill-docstring (0.001959 sec)
   passed   21/312  python-font-lock-assignment-statement-1 (0.000722 sec)
   passed   22/312  python-font-lock-assignment-statement-10 (0.000391 sec)
   passed   23/312  python-font-lock-assignment-statement-11 (0.000680 sec)
   passed   24/312  python-font-lock-assignment-statement-12 (0.000426 sec)
   passed   25/312  python-font-lock-assignment-statement-13 (0.000546 sec)
   passed   26/312  python-font-lock-assignment-statement-14 (0.000442 sec)
   passed   27/312  python-font-lock-assignment-statement-15 (0.000668 sec)
   passed   28/312  python-font-lock-assignment-statement-16 (0.000726 sec)
   passed   29/312  python-font-lock-assignment-statement-17 (0.000408 sec)
   passed   30/312  python-font-lock-assignment-statement-18 (0.000654 sec)
   passed   31/312  python-font-lock-assignment-statement-2 (0.000425 sec)
   passed   32/312  python-font-lock-assignment-statement-3 (0.000360 sec)
   passed   33/312  python-font-lock-assignment-statement-4 (0.000382 sec)
   passed   34/312  python-font-lock-assignment-statement-5 (0.000911 sec)
   passed   35/312  python-font-lock-assignment-statement-6 (0.000443 sec)
   passed   36/312  python-font-lock-assignment-statement-7 (0.000497 sec)
   passed   37/312  python-font-lock-assignment-statement-8 (0.000463 sec)
   passed   38/312  python-font-lock-assignment-statement-9 (0.000572 sec)
Test python-font-lock-assignment-statement-multiline-1 backtrace:
  signal(ert-test-failed (((should (equal faces (python-tests-get-buff
  ert-fail(((should (equal faces (python-tests-get-buffer-faces))) :fo
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'equal) (args-6 (condition-case err (let ((signal-hook
  (let ((python-indent-guess-indent-offset nil)) (python-mode) (insert
  (progn (let ((python-indent-guess-indent-offset nil)) (python-mode) 
  (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
  python-tests-assert-faces-after-change("\n[\n    a,\n    b\n] # (\n 
  (closure (t) nil (python-tests-assert-faces-after-change "\n[\n    a
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-font-lock-assignment-statement
  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-font-lock-assignment-statement-multiline-1 condition:
    (ert-test-failed
     ((should
       (equal faces
	      (python-tests-get-buffer-faces)))
      :form
      (equal
       ((1)
	(8 . font-lock-variable-name-face)
	(9)
	(15 . font-lock-variable-name-face)
	(16))
       ((1)))
      :value nil :explanation
      (proper-lists-of-different-length 5 1
					((1)
					 (8 . font-lock-variable-name-face)
					 (9)
					 (15 . font-lock-variable-name-face)
					 (16))
					((1))
					first-mismatch-at 1)))
   FAILED   39/312  python-font-lock-assignment-statement-multiline-1 (0.000664 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:432
Test python-font-lock-assignment-statement-multiline-2 backtrace:
  signal(ert-test-failed (((should (equal faces (python-tests-get-buff
  ert-fail(((should (equal faces (python-tests-get-buffer-faces))) :fo
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'equal) (args-6 (condition-case err (let ((signal-hook
  (let ((python-indent-guess-indent-offset nil)) (python-mode) (insert
  (progn (let ((python-indent-guess-indent-offset nil)) (python-mode) 
  (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
  python-tests-assert-faces-after-change("\n[\n    *a\n] # 5, 6\n" ((1
  (closure (t) nil (python-tests-assert-faces-after-change "\n[\n    *
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-font-lock-assignment-statement
  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-font-lock-assignment-statement-multiline-2 condition:
    (ert-test-failed
     ((should
       (equal faces
	      (python-tests-get-buffer-faces)))
      :form
      (equal
       ((1)
	(9 . font-lock-variable-name-face)
	(10))
       ((1)))
      :value nil :explanation
      (proper-lists-of-different-length 3 1
					((1)
					 (9 . font-lock-variable-name-face)
					 (10))
					((1))
					first-mismatch-at 1)))
   FAILED   40/312  python-font-lock-assignment-statement-multiline-2 (0.000819 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:448
Test python-font-lock-assignment-statement-multiline-3 backtrace:
  signal(ert-test-failed (((should (equal faces (python-tests-get-buff
  ert-fail(((should (equal faces (python-tests-get-buffer-faces))) :fo
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'equal) (args-6 (condition-case err (let ((signal-hook
  (let ((python-indent-guess-indent-offset nil)) (python-mode) (insert
  (progn (let ((python-indent-guess-indent-offset nil)) (python-mode) 
  (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
  python-tests-assert-faces-after-change("a\\\n    ,\\\n    b\\\n    ,
  (closure (t) nil (python-tests-assert-faces-after-change "a\\\n    ,
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-font-lock-assignment-statement
  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-font-lock-assignment-statement-multiline-3 condition:
    (ert-test-failed
     ((should
       (equal faces
	      (python-tests-get-buffer-faces)))
      :form
      (equal
       ((1 . font-lock-variable-name-face)
	(2)
	(15 . font-lock-variable-name-face)
	(16)
	(29 . font-lock-variable-name-face)
	(30))
       ((1)))
      :value nil :explanation
      (proper-lists-of-different-length 6 1
					((1 . font-lock-variable-name-face)
					 (2)
					 (15 . font-lock-variable-name-face)
					 (16)
					 (29 . font-lock-variable-name-face)
					 (30))
					((1))
					first-mismatch-at 0)))
   FAILED   41/312  python-font-lock-assignment-statement-multiline-3 (0.001431 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:459
Test python-font-lock-assignment-statement-multiline-4 backtrace:
  signal(ert-test-failed (((should (equal faces (python-tests-get-buff
  ert-fail(((should (equal faces (python-tests-get-buffer-faces))) :fo
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'equal) (args-6 (condition-case err (let ((signal-hook
  (let ((python-indent-guess-indent-offset nil)) (python-mode) (insert
  (progn (let ((python-indent-guess-indent-offset nil)) (python-mode) 
  (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
  python-tests-assert-faces-after-change("a\\\n    :\\\n    int\\\n   
  (closure (t) nil (python-tests-assert-faces-after-change "a\\\n    :
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-font-lock-assignment-statement
  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-font-lock-assignment-statement-multiline-4 condition:
    (ert-test-failed
     ((should
       (equal faces
	      (python-tests-get-buffer-faces)))
      :form
      (equal
       ((1 . font-lock-variable-name-face)
	(2)
	(15 . font-lock-builtin-face)
	(18))
       ((1)
	(15 . font-lock-builtin-face)
	(18)))
      :value nil :explanation
      (proper-lists-of-different-length 4 3
					((1 . font-lock-variable-name-face)
					 (2)
					 (15 . font-lock-builtin-face)
					 (18))
					((1)
					 (15 . font-lock-builtin-face)
					 (18))
					first-mismatch-at 0)))
   FAILED   42/312  python-font-lock-assignment-statement-multiline-4 (0.000914 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:477
Test python-font-lock-assignment-statement-multiline-5 backtrace:
  signal(ert-test-failed (((should (equal faces (python-tests-get-buff
  ert-fail(((should (equal faces (python-tests-get-buffer-faces))) :fo
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'equal) (args-6 (condition-case err (let ((signal-hook
  (let ((python-indent-guess-indent-offset nil)) (python-mode) (insert
  (progn (let ((python-indent-guess-indent-offset nil)) (python-mode) 
  (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
  python-tests-assert-faces-after-change("(\\\n    a\\\n)\\\n    #\\\n
  (closure (t) nil (python-tests-assert-faces-after-change "(\\\n    a
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-font-lock-assignment-statement
  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-font-lock-assignment-statement-multiline-5 condition:
    (ert-test-failed
     ((should
       (equal faces
	      (python-tests-get-buffer-faces)))
      :form
      (equal
       ((1)
	(8 . font-lock-variable-name-face)
	(9)
	(46 . font-lock-variable-name-face)
	(47))
       ((1)))
      :value nil :explanation
      (proper-lists-of-different-length 5 1
					((1)
					 (8 . font-lock-variable-name-face)
					 (9)
					 (46 . font-lock-variable-name-face)
					 (47))
					((1))
					first-mismatch-at 1)))
   FAILED   43/312  python-font-lock-assignment-statement-multiline-5 (0.000938 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:488
Test python-font-lock-assignment-statement-multiline-6 backtrace:
  signal(ert-test-failed (((should (equal faces (python-tests-get-buff
  ert-fail(((should (equal faces (python-tests-get-buffer-faces))) :fo
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'equal) (args-6 (condition-case err (let ((signal-hook
  (let ((python-indent-guess-indent-offset nil)) (python-mode) (insert
  (progn (let ((python-indent-guess-indent-offset nil)) (python-mode) 
  (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
  python-tests-assert-faces-after-change("(\n    a\n)\\\n    #\\\n    
  (closure (t) nil (python-tests-assert-faces-after-change "(\n    a\n
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-font-lock-assignment-statement
  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-font-lock-assignment-statement-multiline-6 condition:
    (ert-test-failed
     ((should
       (equal faces
	      (python-tests-get-buffer-faces)))
      :form
      (equal
       ((1)
	(7 . font-lock-variable-name-face)
	(8)
	(43 . font-lock-variable-name-face)
	(44))
       ((1)))
      :value nil :explanation
      (proper-lists-of-different-length 5 1
					((1)
					 (7 . font-lock-variable-name-face)
					 (8)
					 (43 . font-lock-variable-name-face)
					 (44))
					((1))
					first-mismatch-at 1)))
   FAILED   44/312  python-font-lock-assignment-statement-multiline-6 (0.000974 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:506
   passed   45/312  python-font-lock-escape-sequence-bytes-newline (0.000995 sec)
   passed   46/312  python-font-lock-escape-sequence-hex-octal (0.000998 sec)
   passed   47/312  python-font-lock-escape-sequence-multiline-string (0.033337 sec)
   passed   48/312  python-font-lock-escape-sequence-string-newline (0.001479 sec)
   passed   49/312  python-font-lock-escape-sequence-unicode (0.000774 sec)
   passed   50/312  python-font-lock-keywords-level-1-1 (0.000340 sec)
   passed   51/312  python-font-lock-keywords-level-1-2 (0.000325 sec)
   passed   52/312  python-font-lock-keywords-level-1-3 (0.000340 sec)
   passed   53/312  python-font-lock-raw-escape-sequence (0.000723 sec)
Hiding all blocks... 
Hiding all blocks...done
   passed   54/312  python-hideshow-hide-all-1 (0.000749 sec)
Hiding all blocks... 
Hiding all blocks...done
   passed   55/312  python-hideshow-hide-all-2 (0.000466 sec)
Hiding all blocks... 
Hiding all blocks...done
   passed   56/312  python-hideshow-hide-all-3 (0.000862 sec)
   passed   57/312  python-hideshow-hide-block-1 (0.000866 sec)
Hiding blocks ...
Hiding blocks ... done
Showing all blocks ...
Showing all blocks ... done
   passed   58/312  python-hideshow-hide-levels-1 (0.001549 sec)
Showing all blocks ...
Showing all blocks ... done
   passed   59/312  python-hideshow-hide-levels-2 (0.000731 sec)
Hiding blocks ...
Hiding blocks ... done
   passed   60/312  python-hideshow-hide-levels-3 (0.000708 sec)
Hiding blocks ...
Hiding blocks ... done
   passed   61/312  python-hideshow-hide-levels-4 (0.000890 sec)
   passed   62/312  python-imenu-create-flat-index-1 (0.000597 sec)
   passed   63/312  python-imenu-create-flat-index-2 (0.000379 sec)
   passed   64/312  python-imenu-create-index-1 (0.000666 sec)
   passed   65/312  python-imenu-create-index-2 (0.000620 sec)
   passed   66/312  python-imenu-create-index-3 (0.000619 sec)
   passed   67/312  python-imenu-create-index-4 (0.000554 sec)
   passed   68/312  python-indent-after-async-block-1 (0.000767 sec)
   passed   69/312  python-indent-after-async-block-2 (0.000581 sec)
   passed   70/312  python-indent-after-async-block-3 (0.000564 sec)
   passed   71/312  python-indent-after-backslash-1 (0.000930 sec)
   passed   72/312  python-indent-after-backslash-2 (0.001114 sec)
   passed   73/312  python-indent-after-backslash-3 (0.000577 sec)
   passed   74/312  python-indent-after-backslash-4 (0.000633 sec)
   passed   75/312  python-indent-after-backslash-5 (0.000543 sec)
   passed   76/312  python-indent-after-backslash-6 (0.000525 sec)
   passed   77/312  python-indent-after-block-1 (0.000393 sec)
   passed   78/312  python-indent-after-block-2 (0.000365 sec)
   passed   79/312  python-indent-after-block-3 (0.000873 sec)
   passed   80/312  python-indent-after-case-block (0.000660 sec)
   passed   81/312  python-indent-after-comment-1 (0.001335 sec)
   passed   82/312  python-indent-after-comment-2 (0.001904 sec)
   passed   83/312  python-indent-after-comment-3 (0.000778 sec)
   passed   84/312  python-indent-after-match-block (0.000587 sec)
   passed   85/312  python-indent-base-case (0.000582 sec)
   passed   86/312  python-indent-block-enders-1 (0.000855 sec)
   passed   87/312  python-indent-block-enders-2 (0.000876 sec)
   passed   88/312  python-indent-block-enders-3 (0.000500 sec)
   passed   89/312  python-indent-block-enders-4 (0.000573 sec)
   passed   90/312  python-indent-block-enders-5 (0.000538 sec)
   passed   91/312  python-indent-dedent-line-backspace-1 (0.000773 sec)
   passed   92/312  python-indent-dedent-line-backspace-2 (0.000467 sec)
   passed   93/312  python-indent-dedent-line-backspace-3 (0.000601 sec)
   passed   94/312  python-indent-dedenters-1 (0.000789 sec)
Closes if hide_details:
Closes except Exception:
Closes if save:
   passed   95/312  python-indent-dedenters-2 (0.002413 sec)
Closes try:
   passed   96/312  python-indent-dedenters-3 (0.000666 sec)
Closes try:
   passed   97/312  python-indent-dedenters-4 (0.000603 sec)
Closes if save:
   passed   98/312  python-indent-dedenters-5 (0.002787 sec)
   passed   99/312  python-indent-dedenters-6 (0.000479 sec)
   passed  100/312  python-indent-dedenters-7 (0.000494 sec)
Closes if (a == 1 or
Closes if (a == 1 or
Closes if (a == 1 or
   passed  101/312  python-indent-dedenters-8 (0.000818 sec)
Closes if hide_details:
Closes except Exception:
Closes if save:
   passed  102/312  python-indent-dedenters-comment-else (0.002237 sec)
   passed  103/312  python-indent-electric-colon-1 (0.000435 sec)
Closes if do:
   passed  104/312  python-indent-electric-colon-2 (0.000543 sec)
Closes if do:
Closes if do:
Closes if do:
   passed  105/312  python-indent-electric-colon-3 (0.001040 sec)
Closes if True:
   passed  106/312  python-indent-electric-colon-4 (0.000979 sec)
   passed  107/312  python-indent-electric-comma-after-multiline-string (0.000450 sec)
   passed  108/312  python-indent-electric-comma-inside-multiline-string (0.000392 sec)
   passed  109/312  python-indent-hanging-close-paren (0.000734 sec)
   passed  110/312  python-indent-inside-paren-1 (0.001548 sec)
   passed  111/312  python-indent-inside-paren-2 (0.000836 sec)
   passed  112/312  python-indent-inside-paren-3 (0.000454 sec)
   passed  113/312  python-indent-inside-paren-4 (0.000389 sec)
   passed  114/312  python-indent-inside-paren-5 (0.000514 sec)
   passed  115/312  python-indent-inside-paren-6 (0.000423 sec)
   passed  116/312  python-indent-inside-paren-7 (0.000308 sec)
   passed  117/312  python-indent-inside-string-1 (0.000646 sec)
   passed  118/312  python-indent-inside-string-2 (0.002188 sec)
   passed  119/312  python-indent-inside-string-3 (0.000969 sec)
   passed  120/312  python-indent-pep8-1 (0.000510 sec)
   passed  121/312  python-indent-pep8-2 (0.000571 sec)
   passed  122/312  python-indent-pep8-3 (0.000450 sec)
   passed  123/312  python-indent-region-1 (0.000324 sec)
   passed  124/312  python-indent-region-2 (0.000403 sec)
   passed  125/312  python-indent-region-3 (0.000506 sec)
   passed  126/312  python-indent-region-4 (0.000963 sec)
   passed  127/312  python-indent-region-5 (0.003084 sec)
   passed  128/312  python-info-assignment-continuation-line-p-1 (0.000460 sec)
   passed  129/312  python-info-assignment-continuation-line-p-2 (0.000394 sec)
   passed  130/312  python-info-assignment-statement-p-1 (0.000430 sec)
   passed  131/312  python-info-assignment-statement-p-2 (0.000411 sec)
   passed  132/312  python-info-assignment-statement-p-3 (0.000331 sec)
   passed  133/312  python-info-beginning-of-backslash-1 (0.000556 sec)
   passed  134/312  python-info-beginning-of-block-p-1 (0.000396 sec)
   passed  135/312  python-info-beginning-of-block-p-2 (0.000516 sec)
   passed  136/312  python-info-beginning-of-statement-p-1 (0.000672 sec)
   passed  137/312  python-info-beginning-of-statement-p-2 (0.000648 sec)
   passed  138/312  python-info-block-continuation-line-p-1 (0.000494 sec)
   passed  139/312  python-info-block-continuation-line-p-2 (0.000426 sec)
   passed  140/312  python-info-continuation-line-p-1 (0.000975 sec)
   passed  141/312  python-info-current-defun-1 (0.001660 sec)
   passed  142/312  python-info-current-defun-2 (0.014043 sec)
   passed  143/312  python-info-current-defun-3 (0.009954 sec)
   passed  144/312  python-info-current-line-comment-p-1 (0.000359 sec)
   passed  145/312  python-info-current-line-empty-p (0.000283 sec)
   passed  146/312  python-info-current-symbol-1 (0.000538 sec)
   passed  147/312  python-info-current-symbol-2 (0.000741 sec)
   failed  148/312  python-info-current-symbol-3 (0.000451 sec)
   passed  149/312  python-info-dedenter-opening-block-message-1 (0.000451 sec)
Closes try:
Closes try:
   passed  150/312  python-info-dedenter-opening-block-message-2 (0.000404 sec)
Closes except:
Closes except:
   passed  151/312  python-info-dedenter-opening-block-message-3 (0.000499 sec)
Closes else:
Closes else:
   passed  152/312  python-info-dedenter-opening-block-message-4 (0.001379 sec)
Closes if a:
Closes if a:
   passed  153/312  python-info-dedenter-opening-block-message-5 (0.027648 sec)
   passed  154/312  python-info-dedenter-opening-block-position-1 (0.001411 sec)
   passed  155/312  python-info-dedenter-opening-block-position-2 (0.000563 sec)
   passed  156/312  python-info-dedenter-opening-block-position-3 (0.001106 sec)
   passed  157/312  python-info-dedenter-opening-block-positions-1 (0.001127 sec)
   passed  158/312  python-info-dedenter-opening-block-positions-2 (0.000443 sec)
   passed  159/312  python-info-dedenter-opening-block-positions-3 (0.000919 sec)
   passed  160/312  python-info-dedenter-opening-block-positions-4 (0.000455 sec)
   passed  161/312  python-info-dedenter-opening-block-positions-5 (0.000717 sec)
   passed  162/312  python-info-dedenter-opening-block-positions-6 (0.000634 sec)
   passed  163/312  python-info-dedenter-statement-p-1 (0.000619 sec)
   passed  164/312  python-info-dedenter-statement-p-2 (0.000536 sec)
   passed  165/312  python-info-dedenter-statement-p-3 (0.000339 sec)
   passed  166/312  python-info-dedenter-statement-p-4 (0.000731 sec)
   passed  167/312  python-info-dedenter-statement-p-5 (0.000567 sec)
   passed  168/312  python-info-docstring-p-1 (0.001691 sec)
   passed  169/312  python-info-docstring-p-2 (0.001263 sec)
   passed  170/312  python-info-docstring-p-3 (0.001649 sec)
   passed  171/312  python-info-docstring-p-4 (0.002022 sec)
   passed  172/312  python-info-docstring-p-5 (0.002485 sec)
   passed  173/312  python-info-docstring-p-6 (0.001592 sec)
   passed  174/312  python-info-encoding-1 (0.000297 sec)
   passed  175/312  python-info-encoding-2 (0.000255 sec)
   passed  176/312  python-info-encoding-from-cookie-1 (0.000231 sec)
   passed  177/312  python-info-encoding-from-cookie-2 (0.000231 sec)
   passed  178/312  python-info-encoding-from-cookie-3 (0.000225 sec)
   passed  179/312  python-info-encoding-from-cookie-4 (0.000227 sec)
   passed  180/312  python-info-encoding-from-cookie-5 (0.000227 sec)
   passed  181/312  python-info-encoding-from-cookie-6 (0.000368 sec)
   passed  182/312  python-info-encoding-from-cookie-7 (0.000622 sec)
   passed  183/312  python-info-end-of-block-p-1 (0.000953 sec)
   passed  184/312  python-info-end-of-block-p-2 (0.001102 sec)
   passed  185/312  python-info-end-of-statement-p-1 (0.000429 sec)
   passed  186/312  python-info-end-of-statement-p-2 (0.000483 sec)
   passed  187/312  python-info-line-ends-backslash-p-1 (0.000425 sec)
   passed  188/312  python-info-looking-at-beginning-of-block-1 (0.000513 sec)
   passed  189/312  python-info-looking-at-beginning-of-defun-1 (0.000408 sec)
   passed  190/312  python-info-looking-at-beginning-of-defun-2 (0.000401 sec)
   passed  191/312  python-info-looking-at-beginning-of-defun-3 (0.000340 sec)
   passed  192/312  python-info-statement-ends-block-p-1 (0.000450 sec)
   passed  193/312  python-info-statement-ends-block-p-2 (0.000506 sec)
   passed  194/312  python-info-statement-starts-block-p-1 (0.000524 sec)
   passed  195/312  python-info-statement-starts-block-p-2 (0.000620 sec)
Mark set
Mark set
   passed  196/312  python-mark-defun-1 (0.001900 sec)
Mark set
Mark set
   passed  197/312  python-mark-defun-2 (0.001407 sec)
Mark set
Mark set
   passed  198/312  python-mark-defun-3 (0.000651 sec)
Mark set
Mark set
   passed  199/312  python-mark-defun-4 (0.001149 sec)
Mark set
Mark set
Mark set
Mark set
   passed  200/312  python-mark-defun-5 (0.001263 sec)
   passed  201/312  python-nav-backward-defun-1 (0.000532 sec)
   passed  202/312  python-nav-backward-defun-2 (0.000541 sec)
   passed  203/312  python-nav-backward-defun-3 (0.000518 sec)
   passed  204/312  python-nav-backward-defun-4 (0.000570 sec)
   passed  205/312  python-nav-backward-statement-1 (0.000748 sec)
   failed  206/312  python-nav-backward-statement-2 (0.000430 sec)
   failed  207/312  python-nav-backward-up-list-1 (0.000450 sec)
   passed  208/312  python-nav-beginning-of-block-1 (0.000834 sec)
   passed  209/312  python-nav-beginning-of-block-2 (0.000366 sec)
   passed  210/312  python-nav-beginning-of-defun-1 (0.001063 sec)
   passed  211/312  python-nav-beginning-of-defun-2 (0.001636 sec)
   passed  212/312  python-nav-beginning-of-defun-3 (0.000626 sec)
   passed  213/312  python-nav-beginning-of-defun-4 (0.000607 sec)
   passed  214/312  python-nav-beginning-of-defun-5 (0.000494 sec)
   passed  215/312  python-nav-beginning-of-defun-6 (0.000376 sec)
   passed  216/312  python-nav-beginning-of-statement-1 (0.000510 sec)
   passed  217/312  python-nav-end-of-block-1 (0.001677 sec)
   passed  218/312  python-nav-end-of-block-2 (0.000419 sec)
   passed  219/312  python-nav-end-of-defun-1 (0.001392 sec)
   passed  220/312  python-nav-end-of-defun-2 (0.002601 sec)
   passed  221/312  python-nav-end-of-defun-3 (0.000369 sec)
   passed  222/312  python-nav-end-of-statement-1 (0.000514 sec)
   passed  223/312  python-nav-end-of-statement-2 (0.000282 sec)
   passed  224/312  python-nav-forward-block-1 (0.000813 sec)
   passed  225/312  python-nav-forward-block-2 (0.000353 sec)
   passed  226/312  python-nav-forward-defun-1 (0.000433 sec)
   passed  227/312  python-nav-forward-defun-2 (0.000886 sec)
   passed  228/312  python-nav-forward-defun-3 (0.000577 sec)
   passed  229/312  python-nav-forward-defun-4 (0.000522 sec)
   passed  230/312  python-nav-forward-sexp-1 (0.001370 sec)
   passed  231/312  python-nav-forward-sexp-2 (0.002111 sec)
   passed  232/312  python-nav-forward-sexp-3 (0.001728 sec)
   passed  233/312  python-nav-forward-sexp-safe-1 (0.001843 sec)
   passed  234/312  python-nav-forward-statement-1 (0.000610 sec)
   passed  235/312  python-nav-up-list-1 (0.000308 sec)
   passed  236/312  python-parens-electric-indent-1 (0.001479 sec)
   passed  237/312  python-shell-buffer-substring-1 (0.038572 sec)
   passed  238/312  python-shell-buffer-substring-10 (0.000426 sec)
   passed  239/312  python-shell-buffer-substring-11 (0.000410 sec)
   passed  240/312  python-shell-buffer-substring-12 (0.000414 sec)
   passed  241/312  python-shell-buffer-substring-2 (0.000536 sec)
   passed  242/312  python-shell-buffer-substring-3 (0.000511 sec)
   passed  243/312  python-shell-buffer-substring-4 (0.001088 sec)
   passed  244/312  python-shell-buffer-substring-5 (0.000879 sec)
   passed  245/312  python-shell-buffer-substring-6 (0.000700 sec)
   passed  246/312  python-shell-buffer-substring-7 (0.000493 sec)
   passed  247/312  python-shell-buffer-substring-8 (0.000684 sec)
   passed  248/312  python-shell-buffer-substring-9 (0.000551 sec)
   passed  249/312  python-shell-calculate-exec-path-1 (0.000148 sec)
   passed  250/312  python-shell-calculate-exec-path-2 (0.000100 sec)
   passed  251/312  python-shell-calculate-exec-path-3 (0.000100 sec)
   passed  252/312  python-shell-calculate-exec-path-4 (0.002267 sec)
   passed  253/312  python-shell-calculate-exec-path-5 (0.000192 sec)
   passed  254/312  python-shell-calculate-exec-path-6 (0.000248 sec)
   passed  255/312  python-shell-calculate-process-environment-1 (0.000115 sec)
   passed  256/312  python-shell-calculate-process-environment-2 (0.000165 sec)
   passed  257/312  python-shell-calculate-process-environment-3 (0.000177 sec)
   passed  258/312  python-shell-calculate-process-environment-4 (0.000213 sec)
   passed  259/312  python-shell-calculate-process-environment-5 (0.000132 sec)
   passed  260/312  python-shell-calculate-process-environment-6 (0.000136 sec)
   passed  261/312  python-shell-calculate-process-environment-7 (0.000154 sec)
   passed  262/312  python-shell-calculate-process-environment-8 (0.000129 sec)
   passed  263/312  python-shell-calculate-pythonpath-1 (0.000123 sec)
   passed  264/312  python-shell-calculate-pythonpath-2 (0.000125 sec)
   passed  265/312  python-shell-completion-at-point-1 (0.383341 sec)
Warning (python): Your `python-shell-interpreter' doesn't seem to support readline, yet `python-shell-completion-native-enable' was t and "python3" is not part of the `python-shell-completion-native-disabled-interpreters' list.  Native completions have been disabled locally. Consider installing the python package "readline". 
   passed  266/312  python-shell-completion-at-point-native-1 (0.384172 sec)
   passed  267/312  python-shell-completion-native-interpreter-disabled-p-1 (0.000142 sec)
Can't guess python-indent-offset, using defaults: 4
   passed  268/312  python-shell-get-process-1 (0.175549 sec)
   passed  269/312  python-shell-get-process-name-1 (0.000474 sec)
Can't guess python-indent-offset, using defaults: 4
   passed  270/312  python-shell-get-process-name-2 (0.007537 sec)
Can't guess python-indent-offset, using defaults: 4
   passed  271/312  python-shell-internal-get-or-create-process-1 (0.063214 sec)
   passed  272/312  python-shell-internal-get-process-name-1 (0.000356 sec)
Can't guess python-indent-offset, using defaults: 4
   passed  273/312  python-shell-internal-get-process-name-2 (0.007172 sec)
   passed  274/312  python-shell-make-comint-1 (0.053562 sec)
   passed  275/312  python-shell-make-comint-2 (0.055322 sec)
   passed  276/312  python-shell-make-comint-3 (0.053228 sec)
   passed  277/312  python-shell-make-comint-4 (0.056223 sec)
   passed  278/312  python-shell-prompt-detect-1 (0.081694 sec)
   passed  279/312  python-shell-prompt-detect-2 (0.078266 sec)
   passed  280/312  python-shell-prompt-detect-3 (0.000406 sec)
Warning (python): Python shell prompts cannot be detected.
If your emacs session hangs when starting python shells
recover with `keyboard-quit' and then try fixing the
interactive flag for your interpreter by adjusting the
`python-shell-interpreter-interactive-arg' or add regexps
matching shell prompts in the directory-local friendly vars:
  + `python-shell-prompt-regexp'
  + `python-shell-prompt-block-regexp'
  + `python-shell-prompt-output-regexp'
Or alternatively in:
  + `python-shell-prompt-input-regexps'
  + `python-shell-prompt-output-regexps'
   passed  281/312  python-shell-prompt-detect-4 (0.077375 sec)
   passed  282/312  python-shell-prompt-detect-5 (0.086903 sec)
   passed  283/312  python-shell-prompt-detect-6 (0.001004 sec)
   passed  284/312  python-shell-prompt-set-calculated-regexps-1 (0.000150 sec)
   passed  285/312  python-shell-prompt-set-calculated-regexps-2 (0.000091 sec)
   passed  286/312  python-shell-prompt-set-calculated-regexps-3 (0.000075 sec)
   passed  287/312  python-shell-prompt-set-calculated-regexps-4 (0.000091 sec)
   passed  288/312  python-shell-prompt-set-calculated-regexps-5 (0.000090 sec)
   passed  289/312  python-shell-prompt-set-calculated-regexps-6 (0.081363 sec)
   passed  290/312  python-shell-prompt-validate-regexps-1 (0.000193 sec)
   passed  291/312  python-shell-prompt-validate-regexps-2 (0.000214 sec)
   passed  292/312  python-shell-prompt-validate-regexps-3 (0.000134 sec)
   passed  293/312  python-shell-prompt-validate-regexps-4 (0.000116 sec)
   passed  294/312  python-shell-prompt-validate-regexps-5 (0.000113 sec)
   passed  295/312  python-shell-prompt-validate-regexps-6 (0.000118 sec)
   passed  296/312  python-shell-prompt-validate-regexps-7 (0.000065 sec)
   passed  297/312  python-shell-with-environment-1 (0.000339 sec)
   passed  298/312  python-shell-with-environment-2 (0.000624 sec)
   passed  299/312  python-shell-with-environment-3 (0.000661 sec)
   passed  300/312  python-syntax-after-python-backspace (0.000444 sec)
Test python-tests--fill-long-first-line backtrace:
  signal(ert-test-failed (((should (equal (with-temp-buffer (insert "d
  ert-fail(((should (equal (with-temp-buffer (insert "def asdf():\n   
  (if (unwind-protect (setq value-4805 (apply fn-4803 args-4804)) (set
  (let (form-description-4807) (if (unwind-protect (setq value-4805 (a
  (let ((value-4805 'ert-form-evaluation-aborted-4806)) (let (form-des
  (let* ((fn-4803 #'equal) (args-4804 (condition-case err (let ((signa
  (closure (t) nil (let* ((fn-4803 #'equal) (args-4804 (condition-case
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name python-tests--fill-long-first-line :d
  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-tests--fill-long-first-line condition:
    (ert-test-failed
     ((should
       (equal
	(with-temp-buffer ... ... ... ... ... ... ...)
	"def asdf():\n    \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123\n    SHOULDBEWRAPPED 123 123 123 123\n\n    \"\"\"\n    a = 1\n"))
      :form
      (equal "def asdf():\n    \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123\n    SHOULDBEWRAPPED 123 123 123 123\n\n    \"\"\"\n    a = 1" "def asdf():\n    \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123\n    SHOULDBEWRAPPED 123 123 123 123\n\n    \"\"\"\n    a = 1\n")
      :value nil :explanation
      (arrays-of-different-length 125 126 "def asdf():\n    \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123\n    SHOULDBEWRAPPED 123 123 123 123\n\n    \"\"\"\n    a = 1" "def asdf():\n    \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123\n    SHOULDBEWRAPPED 123 123 123 123\n\n    \"\"\"\n    a = 1\n" first-mismatch-at 125)))
   FAILED  301/312  python-tests--fill-long-first-line (0.001178 sec) at ../../emacs/test/lisp/progmodes/python-tests.el:6776
   passed  302/312  python-tests--flymake-command-output-pattern (0.000208 sec)
   passed  303/312  python-tests--run-python-selects-window (0.093070 sec)
   passed  304/312  python-tests-look-at-1 (0.000461 sec)
   passed  305/312  python-tests-look-at-2 (0.000332 sec)
   passed  306/312  python-triple-double-quote-pairing (0.002565 sec)
   passed  307/312  python-triple-single-quote-pairing (0.001300 sec)
   passed  308/312  python-util-clone-local-variables-1 (0.000368 sec)
   passed  309/312  python-util-forward-comment-1 (0.001032 sec)
   passed  310/312  python-util-goto-line-1 (0.000282 sec)
   passed  311/312  python-util-strip-string-1 (0.000130 sec)
   passed  312/312  python-util-valid-regexp-p-1 (0.000085 sec)

Ran 312 tests, 304 results as expected, 8 unexpected (2022-11-22 11:07:57+0100, 8.724467 sec)
3 expected failures

8 unexpected results:
   FAILED  python-ffap-module-path-1
   FAILED  python-font-lock-assignment-statement-multiline-1
   FAILED  python-font-lock-assignment-statement-multiline-2
   FAILED  python-font-lock-assignment-statement-multiline-3
   FAILED  python-font-lock-assignment-statement-multiline-4
   FAILED  python-font-lock-assignment-statement-multiline-5
   FAILED  python-font-lock-assignment-statement-multiline-6
   FAILED  python-tests--fill-long-first-line

make[1]: *** [lisp/progmodes/python-tests.log] Error 1
make: *** [lisp/progmodes/python-tests] Error 2

Compilation exited abnormally with code 2 at Tue Nov 22 11:07:57

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  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-25 16:50 ` Mattias Engdegård
  2 siblings, 0 replies; 15+ messages in thread
From: Yuan Fu @ 2022-11-23  2:40 UTC (permalink / raw)
  To: mattias.engdegard; +Cc: 59477


Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> The python-tests fail when Emacs is built without tree-sitter:

Thanks. Seems to be some problem with expanding the font-lock region.
I’m working on it.

Yuan





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  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
  2 siblings, 1 reply; 15+ messages in thread
From: Yuan Fu @ 2022-11-23 22:00 UTC (permalink / raw)
  To: mattias.engdegard; +Cc: 59477


Yuan Fu <casouri@gmail.com> writes:

> Mattias Engdegård <mattias.engdegard@gmail.com> writes:
>
>> The python-tests fail when Emacs is built without tree-sitter:
>
> Thanks. Seems to be some problem with expanding the font-lock region.
> I’m working on it.
>
> Yuan

The python-font-lock-assignment-statement-multiline-xxx tests failing
are due to me accidentally dropping code when copying around:

(setq-local font-lock-defaults
              `(,python-font-lock-keywords
                nil nil nil nil
                (font-lock-syntactic-face-function
                 . python-font-lock-syntactic-face-function)
                (font-lock-extend-after-change-region-function
                 . python-font-lock-extend-region)))

became

(setq-local font-lock-defaults
              `(,python-font-lock-keywords
                nil nil nil nil
                (font-lock-syntactic-face-function
                 . python-font-lock-syntactic-face-function)))

The python-tests--fill-long-first-line test fails because the retunred
buffer-string doesn’t have the newline at the end.

Specifically, the return of this form

(with-temp-buffer
      (insert "def asdf():
    \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123 SHOULDBEWRAPPED 123 123 123 123

    \"\"\"
    a = 1
")
      (python-mode)
      (goto-char (point-min))
      (forward-line 1)
      (end-of-line)
      (fill-paragraph)
      (buffer-substring-no-properties (point-min) (point-max)))

Doesn’t have the newline at the end.

But if I run this in a buffer manually I get the ending newline. I’m not
sure what’s the cause of that.  Bisecting give
7c5d4348330b206aff1f8e5bc4fd241d6a6dc0b5, but that commit doesn’t change
anything filling-related.

Yuan





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-23 22:00 ` Yuan Fu
@ 2022-11-24  6:45   ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2022-11-24  6:45 UTC (permalink / raw)
  To: Yuan Fu; +Cc: mattias.engdegard, 59477

> Cc: 59477@debbugs.gnu.org
> From: Yuan Fu <casouri@gmail.com>
> Date: Wed, 23 Nov 2022 14:00:51 -0800
> 
> But if I run this in a buffer manually I get the ending newline. I’m not
> sure what’s the cause of that.

Perhaps mode-require-final-newline?





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  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-25 16:50 ` Mattias Engdegård
  2022-11-26 22:18   ` Yuan Fu
  2 siblings, 1 reply; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-25 16:50 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Stefan Monnier, 59477

> But if I run this in a buffer manually I get the ending newline. I’m not sure what’s the cause of that. Bisecting give 7c5d4348330b206aff1f8e5bc4fd241d6a6dc0b5, but that commit doesn’t change anything filling-related. 

No idea really, but it might have something to do with the fact that the changes move the assignments

  (setq-local font-lock-defaults
              `(,python-font-lock-keywords
                nil nil nil nil
                (font-lock-syntactic-face-function
                 . python-font-lock-syntactic-face-function)))
  (setq-local syntax-propertize-function
              python-syntax-propertize-function)

so that they are executed after

  (when python-indent-guess-indent-offset
    (python-indent-guess-indent-offset))

instead of before. `python-indent-guess-indent-offset` has the side-effect of setting syntax properties, in particular for the string terminator (triple-quote in the test).

This is important, because python-fill-string (called as part of fill-paragraph in the test) assumes this having already been done and if not, str-end-pos isn't computed correctly and things take a turn for the worse after that.

Stefan probably knows better how this is supposed to work, but presumably python-fill-string should take measures to ensure accurate syntax properties before doing things like

  (re-search-forward (rx (syntax string-delimiter)) nil t)

and so on. Sorry about not being of much help here.






^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  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-27 13:16     ` Mattias Engdegård
  0 siblings, 2 replies; 15+ messages in thread
From: Yuan Fu @ 2022-11-26 22:18 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: Stefan Monnier, 59477



> On Nov 25, 2022, at 8:50 AM, Mattias Engdegård <mattias.engdegard@gmail.com> wrote:
> 
>> But if I run this in a buffer manually I get the ending newline. I’m not sure what’s the cause of that. Bisecting give 7c5d4348330b206aff1f8e5bc4fd241d6a6dc0b5, but that commit doesn’t change anything filling-related. 
> 
> No idea really, but it might have something to do with the fact that the changes move the assignments
> 
>  (setq-local font-lock-defaults
>              `(,python-font-lock-keywords
>                nil nil nil nil
>                (font-lock-syntactic-face-function
>                 . python-font-lock-syntactic-face-function)))
>  (setq-local syntax-propertize-function
>              python-syntax-propertize-function)
> 
> so that they are executed after
> 
>  (when python-indent-guess-indent-offset
>    (python-indent-guess-indent-offset))
> 
> instead of before. `python-indent-guess-indent-offset` has the side-effect of setting syntax properties, in particular for the string terminator (triple-quote in the test).
> 
> This is important, because python-fill-string (called as part of fill-paragraph in the test) assumes this having already been done and if not, str-end-pos isn't computed correctly and things take a turn for the worse after that.
> 
> Stefan probably knows better how this is supposed to work, but presumably python-fill-string should take measures to ensure accurate syntax properties before doing things like
> 
>  (re-search-forward (rx (syntax string-delimiter)) nil t)
> 
> and so on. Sorry about not being of much help here.
> 

Thanks, that’s a very useful information. And I can only blame myself for breaking the tests :-)

While still unable to find the culprit. I have the following observations:

1. Setting require-final-newline to t doesn’t work
2. If I change with-temp-buffer to with-current-buffer (get-buffer-create "*test*”), the problem disappears, the newlines is not dropped
3. I edebugged fill-paragraph, the newlines in the temp buffer disappears at line 865 in fill.el, where the recursive call returns. Before (funcall function justify) returns (`function` is fill-paragraph itself), the newline still exists, but after we return to the caller at line 865, the newline disappears.

I checked for newline by hitting e and evaluating (char-before (point-max))

Yuan




^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-26 22:18   ` Yuan Fu
@ 2022-11-27 13:07     ` Mattias Engdegård
  2022-11-30 13:41       ` Mattias Engdegård
  2022-11-27 13:16     ` Mattias Engdegård
  1 sibling, 1 reply; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-27 13:07 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Stefan Monnier, 59477

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

26 nov. 2022 kl. 23.18 skrev Yuan Fu <casouri@gmail.com>:

> 1. Setting require-final-newline to t doesn’t work

As expected; it's not relevant here.

> 2. If I change with-temp-buffer to with-current-buffer (get-buffer-create "*test*”), the problem disappears, the newlines is not dropped

Yes, because you then reuse an old buffer that already has local variables set.

I'm tempted to push this patch that sinks the call to python-indent-guess-indent-offset so that it comes last in mode initialisation, as discussed in my previous message. Any objection?

As mentioned, I'm not sure it really addresses the root problem but at least it should be no worse than before the changes that broke the test.


[-- Attachment #2: python-mode.diff --]
[-- Type: application/octet-stream, Size: 1395 bytes --]

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index acfee21135..fc80c755e4 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -6584,9 +6584,6 @@ python-base-mode
 
   (make-local-variable 'python-shell-internal-buffer)
 
-  (when python-indent-guess-indent-offset
-    (python-indent-guess-indent-offset))
-
   (add-hook 'flymake-diagnostic-functions #'python-flymake nil t))
 
 ;;;###autoload
@@ -6605,7 +6602,11 @@ python-mode
               python-syntax-propertize-function)
   (setq-local imenu-create-index-function
               #'python-imenu-create-index)
-  (add-hook 'which-func-functions #'python-info-current-defun nil t))
+
+  (add-hook 'which-func-functions #'python-info-current-defun nil t)
+
+  (when python-indent-guess-indent-offset
+    (python-indent-guess-indent-offset)))
 
 ;;;###autoload
 (define-derived-mode python-ts-mode python-base-mode "Python"
@@ -6625,7 +6626,10 @@ python-ts-mode
                 #'python-imenu-treesit-create-index)
     (setq-local treesit-defun-type-regexp (rx (or "function" "class")
                                               "_definition"))
-    (treesit-major-mode-setup)))
+    (treesit-major-mode-setup)
+
+  (when python-indent-guess-indent-offset
+    (python-indent-guess-indent-offset))))
 
 ;;; Completion predicates for M-x
 ;; Commands that only make sense when editing Python code

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-26 22:18   ` Yuan Fu
  2022-11-27 13:07     ` Mattias Engdegård
@ 2022-11-27 13:16     ` Mattias Engdegård
  2022-11-27 14:48       ` kobarity
  1 sibling, 1 reply; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-27 13:16 UTC (permalink / raw)
  To: Yuan Fu; +Cc: kobarity, Stefan Monnier, 59477

[-- 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.)



^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  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 10:18         ` Mattias Engdegård
  0 siblings, 2 replies; 15+ messages in thread
From: kobarity @ 2022-11-27 14:48 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: Yuan Fu, Stefan Monnier, 59477


Mattias Engdegård wrote:
> 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.

`python-ffap-module-path-1' does not fail on my Ubuntu 22.04
environment.  It seems to me that `python-ffap-module-path' or
`python-shell-send-string-no-output' is not working as expected on
your environment.

Could you tell me the results of doing the following?

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".





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-27 14:48       ` kobarity
@ 2022-11-28 10:01         ` Mattias Engdegård
  2022-11-28 15:18           ` kobarity
  2022-11-28 10:18         ` Mattias Engdegård
  1 sibling, 1 reply; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-28 10:01 UTC (permalink / raw)
  To: kobarity; +Cc: Yuan Fu, Stefan Monnier, 59477

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

27 nov. 2022 kl. 15.48 skrev kobarity <kobarity@gmail.com>:

> It seems to me that `python-ffap-module-path' or
> `python-shell-send-string-no-output' is not working as expected on
> your environment.

Indeed, something in Emacs is making incorrect assumptions.

> 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.


[-- Attachment #2: python-shell-output-filter-trace.log --]
[-- Type: application/octet-stream, Size: 2888 bytes --]

======================================================================
1 -> (python-shell-output-filter "exec(\"def __PYTHON_EL_eval(source, filename):\\n    import ast, sys\\n    if sys.version_info[0] == 2:\\n        from __builtin__ import compile, eval, globals\\n    else:\\n        from builtins import compile, eval, globals\\n    try:\\n        p, e = ast.parse(source, filename), None\\n    except SyntaxError:\\n        t, v, tb = sys.exc_info()\\n        sys.excepthook(t, v, tb.tb_next)\\n        return\\n    if p.body and isinstance(p.body[-1], ast.Expr):\\n        e = p.body.pop()\\n    try:\\n        g = globals()\\n        exec(compile(p, filename, 'exec'), g, g)\\n        if e:\\n            return eval(compile(ast.Expression(e.value), filename, 'eval'), g, g)\\n    except Exception:\\n        t, v, tb = sys.exc_info()\\n        sys.excepthook(t, v, tb.tb_next)\")\r\n")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "exec(\"def __PYTHON_EL_eval_file(filename, tempname, delete):\\n    import codecs, os, re\\n    pattern = r'^[ \\t\\f]*#.*?coding[:=][ \\t]*([-_.a-zA-Z0-9]+)'\\n    with codecs.open(tempname or filename, encoding='latin-1') as file:\\n        match = re.match(pattern, file.readline())\\n        match = match or re.match(pattern, file.readline())\\n        encoding = match.group(1) if match else 'utf-8'\\n    with codecs.open(tempname or filename, encoding=encoding) as file:\\n        source = file.read().encode(encoding)\\n    if delete and tempname:\\n        os.remove(tempname)\\n    return __PYTHON_EL_eval(source, filename)\")\r\n")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "__PYTHON_EL_eval_file(\"/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/pyDjIqzH\", \"/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/pyDjIqzH\", True)\r\n")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "python.el: native completion setup failed, <class 'Exception'>: libedit based readline is known not to work,\r\n      see etc/PROBLEMS under \"In Inferior Python mode, input is echoed\".\r\n>>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "__PYTHON_EL_eval(\"print('a')\", \"/Users/mattias/emacs/asdf.py\")\r\na\r\n>>> ")
1 <- python-shell-output-filter: ""

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-27 14:48       ` kobarity
  2022-11-28 10:01         ` Mattias Engdegård
@ 2022-11-28 10:18         ` Mattias Engdegård
  1 sibling, 0 replies; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-28 10:18 UTC (permalink / raw)
  To: kobarity; +Cc: Yuan Fu, Stefan Monnier, 59477

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

Here is a trace of python-shell-output-filter when running the failing test (python-ffap-module-path-1):


[-- Attachment #2: python-test-trace.log --]
[-- Type: application/octet-stream, Size: 3186 bytes --]

======================================================================
1 -> (python-shell-output-filter "exec(\"def __PYTHON_EL_eval(source, filename):\\n    import ast, sys\\n    if sys.version_info[0] == 2:\\n        from __builtin__ import compile, eval, globals\\n    else:\\n        from builtins import compile, eval, globals\\n    try:\\n        p, e = ast.parse(source, filename), None\\n    except SyntaxError:\\n        t, v, tb = sys.exc_info()\\n        sys.excepthook(t, v, tb.tb_next)\\n        return\\n    if p.body and isinstance(p.body[-1], ast.Expr):\\n        e = p.body.pop()\\n    try:\\n        g = globals()\\n        exec(compile(p, filename, 'exec'), g, g)\\n        if e:\\n            return eval(compile(ast.Expression(e.value), filename, 'eval'), g, g)\\n    except Exception:\\n        t, v, tb = sys.exc_info()\\n        sys.excepthook(t, 
 \n")b.tb_next)\")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "exec(\"def __PYTHON_EL_eval_file(filename, tempname, delete):\\n    import codecs, os, re\\n    pattern = r'^[ \\t\\f]*#.*?coding[:=][ \\t]*([-_.a-zA-Z0-9]+)'\\n    with codecs.open(tempname or filename, encoding='latin-1') as file:\\n        match = re.match(pattern, file.readline())\\n        match = match or re.match(pattern, file.readline())\\n        encoding = match.group(1) if match else 'utf-8'\\n    with codecs.open(tempname or filename, encoding=encoding) as file:\\n        source = file.read().encode(encoding)\\n    if delete and tempname:\\n        os.remove(tempname)\\n    return __PYTH\n")L_eval(source, filename)\")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "__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_pa\n")\\"abc\\\"))\", \"<string>\")
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter "/Applications/Xcode.app/Contents/Developer/Lib\n")/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/abc.py
1 <- python-shell-output-filter: ""
======================================================================
1 -> (python-shell-output-filter ">>> ")
1 <- python-shell-output-filter: ""

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-28 10:01         ` Mattias Engdegård
@ 2022-11-28 15:18           ` kobarity
  2022-11-28 19:22             ` Mattias Engdegård
  0 siblings, 1 reply; 15+ messages in thread
From: kobarity @ 2022-11-28 15:18 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: Yuan Fu, Stefan Monnier, 59477

[-- 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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-28 15:18           ` kobarity
@ 2022-11-28 19:22             ` Mattias Engdegård
  0 siblings, 0 replies; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-28 19:22 UTC (permalink / raw)
  To: kobarity; +Cc: Yuan Fu, Stefan Monnier, 59477

28 nov. 2022 kl. 16.18 skrev kobarity <kobarity@gmail.com>:

> It seems
> to be a bug that has existed for some time on Mac.  Here is the trace
> on my Ubuntu.

Right, it looks like the input lines aren't echoed. (Conversing through a TTY is really a terrible mode for issuing commands and getting replies reliably.)

> 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?

It's probably best to always skip the test on macOS, since there is no telling whether the Python used is the system-supplied one with libedit or one where the user installed readline. That's the change that I ended up pushing.

Thanks for your kind help!






^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-27 13:07     ` Mattias Engdegård
@ 2022-11-30 13:41       ` Mattias Engdegård
  2022-12-04  7:51         ` Yuan Fu
  0 siblings, 1 reply; 15+ messages in thread
From: Mattias Engdegård @ 2022-11-30 13:41 UTC (permalink / raw)
  To: Yuan Fu; +Cc: 59477-done, Stefan Monnier

27 nov. 2022 kl. 14.07 skrev Mattias Engdegård <mattias.engdegard@gmail.com>:

> I'm tempted to push this patch that sinks the call to python-indent-guess-indent-offset

and have now succumbed to the temptation: pushed to emacs-29.

This should fix the last observed failure in python-tests and the bug can be closed.






^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#59477: python-tests fail without tree-sitter
  2022-11-30 13:41       ` Mattias Engdegård
@ 2022-12-04  7:51         ` Yuan Fu
  0 siblings, 0 replies; 15+ messages in thread
From: Yuan Fu @ 2022-12-04  7:51 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 59477-done, Stefan Monnier



> On Nov 30, 2022, at 5:41 AM, Mattias Engdegård <mattias.engdegard@gmail.com> wrote:
> 
> 27 nov. 2022 kl. 14.07 skrev Mattias Engdegård <mattias.engdegard@gmail.com>:
> 
>> I'm tempted to push this patch that sinks the call to python-indent-guess-indent-offset
> 
> and have now succumbed to the temptation: pushed to emacs-29.
> 
> This should fix the last observed failure in python-tests and the bug can be closed.
> 

Sorry for the delay, I just got around and came back to this bug. It didn’t fix the test for me when I tried you suggestion. But it’s probably some problem with my execution, since your patch clearly fixes the test. Anyway, thanks a ton for fixing this! One more stone off my chest :-)

Yuan




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-12-04  7:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-11-28 19:22             ` Mattias Engdegård
2022-11-28 10:18         ` Mattias Engdegård

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).