[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup c83ba7d 268/340: Extract function buttercup-elap
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup c83ba7d 268/340: Extract function buttercup-elapsed-time-string |
Date: |
Thu, 16 Dec 2021 14:59:48 -0500 (EST) |
branch: elpa/buttercup
commit c83ba7d1e1d7d8a57baf3d254e8d35ced4d092a7
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
Extract function buttercup-elapsed-time-string
---
buttercup.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index 4274714..6b7b6fe 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -791,6 +791,10 @@ Return CHILD."
(or (buttercup-suite-or-spec-time-ended suite-or-spec) (current-time))
(or (buttercup-suite-or-spec-time-started suite-or-spec) (current-time))))
+(defun buttercup-elapsed-time-string (suite-or-spec)
+ "Convert the elapsed time for SUITE-OR-SPEC to a short string."
+ (seconds-to-string (float-time (buttercup-elapsed-time suite-or-spec))))
+
;;;;;;;;;;;;;;;;;;;;
;;; Suites: describe
@@ -1591,9 +1595,7 @@ EVENT and ARG are described in `buttercup-reporter'."
(buttercup--print " %s" (buttercup-spec-failure-description arg)))
(t
(error "Unknown spec status %s" (buttercup-spec-status arg))))
- (buttercup--print " (%s)\n"
- (seconds-to-string
- (float-time (buttercup-elapsed-time arg)))))
+ (buttercup--print " (%s)\n" (buttercup-elapsed-time-string arg)))
(`suite-done
(when (= 0 (length (buttercup-suite-or-spec-parents arg)))
@@ -1672,9 +1674,7 @@ EVENT and ARG are described in `buttercup-reporter'."
(buttercup-spec-failure-description arg))))
(t
(error "Unknown spec status %s" (buttercup-spec-status arg))))
- (buttercup--print " (%s)\n"
- (seconds-to-string
- (float-time (buttercup-elapsed-time arg))))))
+ (buttercup--print " (%s)\n" (buttercup-elapsed-time-string arg))))
(`buttercup-done
(dolist (failed buttercup-reporter-batch--failures)
- [nongnu] elpa/buttercup fc19598 225/340: Add examples for checking return value and thrown signal of a spy, (continued)
- [nongnu] elpa/buttercup fc19598 225/340: Add examples for checking return value and thrown signal of a spy, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6590360 226/340: Fix a few typos and other small errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8a28489 230/340: Bump version: 1.18 → 1.19, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0e40587 231/340: Tweak the spy-contexts to be more backward compatible, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 60028db 236/340: docs: Clarify the spy lifespan in writing-tests.md, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9c4b473 237/340: test: Add missing apostrophe in spec title, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 90654ec 238/340: Update some docstrings, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 178c795 242/340: README: Add '-L .' to test runner example, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup fc4276a 247/340: Make it possible to abort test run cleanly, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup dbcd3d4 256/340: Calculate total test run time with current-time, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c83ba7d 268/340: Extract function buttercup-elapsed-time-string,
ELPA Syncer <=
- [nongnu] elpa/buttercup 38cfa6f 270/340: Fix spy-on on Emacs 24.3 for symbols that are not fbound, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 81bfed4 272/340: test: Add utility function send-string-to-ansi-buffer, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup cf4eee8 274/340: test: Verify output in the "The batch reporter" suite, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4159111 275/340: test: Verify full line for reporter spec-done tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup fbb790b 278/340: test: Add tests for buttercup-started and buttercup-reporter-batch-color, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d563e18 281/340: test: Add color tests for suite-done, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b910b71 285/340: Extract buttercup--indented-description from the batch reporters, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e71a40f 287/340: Make sure carriage movement characters are not colorized, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a22fc29 288/340: Bump version: 1.21 → 1.22, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup dde8651 290/340: Add new function buttercup--spec-mark-pending and use it, ELPA Syncer, 2021/12/16