From f4268c22f377e75e0c35a42d202237a0baa0db45 Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Fri, 20 Jun 2025 14:03:40 +0000 Subject: [PATCH] Revert "Avoid excessively large backtraces in ert-tests (bug#71988)" This reverts commit 0264ab11181b1d49d8f07186599396d503f24d1f. (cherry picked from commit 1bc86b17768231afcf14e9df08629088dbded428) --- test/lisp/emacs-lisp/ert-tests.el | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/lisp/emacs-lisp/ert-tests.el b/test/lisp/emacs-lisp/ert-tests.el index 03a62f74313..7ecffa79e77 100644 --- a/test/lisp/emacs-lisp/ert-tests.el +++ b/test/lisp/emacs-lisp/ert-tests.el @@ -595,14 +595,9 @@ This macro is used to test if macroexpansion in `should' works." :body (lambda () (should (equal complex-list 1)))))) (let ((ert-debug-on-error nil) messages) - (cl-letf* (((symbol-function 'cl-print-object) - (symbol-function 'cl-print-object)) - ((symbol-function 'message) + (cl-letf* (((symbol-function 'message) (lambda (format-string &rest args) (push (apply #'format format-string args) messages)))) - ;; don't print the ert--stats-tests vector, which would run out of - ;; memory if previous tests have failed. - (cl-defmethod cl-print-object ((_object vector) _stream)) (save-window-excursion (let ((case-fold-search nil) (ert-batch-backtrace-right-margin nil) @@ -617,9 +612,7 @@ This macro is used to test if macroexpansion in `should' works." do (unless found-frame (setq found-frame (cl-search frame msg :test 'equal)))) - (should found-frame)))) - ;; ensure our temporary binding was undone. - (should (equal (cl-prin1-to-string [a]) "[a]"))) + (should found-frame))))) (ert-deftest ert-test-special-operator-p () (should (ert--special-operator-p 'if)) -- 2.39.5