[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 09459403f5: Do not store backtraces for pending
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 09459403f5: Do not store backtraces for pending specs |
Date: |
Thu, 17 Mar 2022 14:57:59 -0400 (EDT) |
branch: elpa/buttercup
commit 09459403f54783ddff9337010d9536da25ca7818
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
Do not store backtraces for pending specs
Only call buttercup--backtrace when the signal is not
buttercup-pending.
Fixes #205.
---
buttercup.el | 5 ++++-
tests/test-buttercup.el | 13 ++++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index c1787b9ff9..5fa482ec8d 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1938,7 +1938,10 @@ ARGS according to `debugger'."
;; subsequent calls. Thanks to ert for this.
(setq num-nonmacro-input-events (1+ num-nonmacro-input-events))
(throw 'buttercup-debugger-continue
- (list 'failed args (buttercup--backtrace))))
+ (list 'failed args
+ (cl-destructuring-bind (_ (signal-type . _data)) args
+ (unless (eq signal-type 'buttercup-pending)
+ (buttercup--backtrace))))))
(defalias 'buttercup--mark-stackframe 'ignore
"Marker to find where the backtrace start.")
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 4b73b786c5..d51b432c5f 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -1585,7 +1585,18 @@ text properties using `ansi-color-apply'."
(matcher-spec ":to-have-been-called-with" :to-have-been-called-with 2)
(matcher-spec ":not :to-have-been-called-with" :not
:to-have-been-called-with 2)
(matcher-spec ":to-have-been-called-times" :to-have-been-called-times 2)
- (matcher-spec ":not :to-have-been-called-times" :not
:to-have-been-called-times 2))))
+ (matcher-spec ":not :to-have-been-called-times" :not
:to-have-been-called-times 2)))
+ (it "should not generate backtraces for skipped specs"
+ (let (test-spec)
+ (spy-on 'buttercup--backtrace :and-call-through)
+ (with-local-buttercup
+ (describe "one description"
+ (it "with a pending spec")
+ (buttercup-skip "skip"))
+ (buttercup-run :noerror)
+ (setq test-spec (car (buttercup-suite-children (car
buttercup-suites)))))
+ (expect 'buttercup--backtrace :not :to-have-been-called)
+ (expect (buttercup-spec-failure-stack test-spec) :to-be nil))))
(describe "When using quiet specs in the batch reporter"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/buttercup 09459403f5: Do not store backtraces for pending specs,
ELPA Syncer <=