emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/buttercup 8271c27 254/340: Only update spec state if it is


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup 8271c27 254/340: Only update spec state if it is worse or equal
Date: Thu, 16 Dec 2021 14:59:45 -0500 (EST)

branch: elpa/buttercup
commit 8271c27b65e220c22b20b19d0261e5d397cac1dd
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    Only update spec state if it is worse or equal
    
    Only change state when the new state is 'worse' than or same as the
    current state. The constant list is the prioritized list of
    states. The new state is worse if it is in the tail of the
    
    Fixes #157.
    Fixes #149.
---
 buttercup.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/buttercup.el b/buttercup.el
index 14c8b35..62a7332 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1510,8 +1510,13 @@ failed and pending specs."
         (`(error (buttercup-pending . ,pending-description))
          (setq status 'pending
                description pending-description))))
-    (when (memq (buttercup-suite-or-spec-status suite-or-spec)
-                '(passed pending))
+    ;; Only change state when the new state is 'worse' than or same as
+    ;; the current state. The constant list is the prioritized list of
+    ;; states. The new state is worse if it is in the tail of the
+    ;; current state.
+    (when (memq status
+                (memq (buttercup-suite-or-spec-status suite-or-spec)
+                      '(passed pending failed)))
       (setf (buttercup-suite-or-spec-status suite-or-spec) status
             (buttercup-suite-or-spec-failure-description suite-or-spec) 
description
             (buttercup-suite-or-spec-failure-stack suite-or-spec) stack))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]