Skip to content

Commit d880439

Browse files
committed
tests: Cleanup and comments
1 parent 4e8db2c commit d880439

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/test-buttercup.el

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,7 @@ before it's processed by other functions."
19471947
(kill-buffer print-buffer)
19481948
(setq print-buffer nil))
19491949
;; define a buttercup-reporter-batch variant that only outputs on
1950-
;; buttercup-done
1950+
;; buttercup-done, because that is where backtraces are printed
19511951
(before-each
19521952
(spy-on 'backtrace-reporter :and-call-fake
19531953
(lambda (event arg)
@@ -1960,11 +1960,12 @@ before it's processed by other functions."
19601960
(spy-on 'buttercup-reporter-batch--print-summary))
19611961
;; define a known backtrace with a typical error
19621962
(before-all
1963-
(defun bc-bt-foo (a) (bc-bt-bar a))
1964-
(defun bc-bt-bar (a) (bc-bt-baz a))
1965-
(defun bc-bt-baz (a)
1963+
(defun bc-bt-baz (a)
19661964
(or (number-or-marker-p a)
1967-
(signal 'wrong-type-argument `(number-or-marker-p ,a)))))
1965+
(signal 'wrong-type-argument `(number-or-marker-p ,a))))
1966+
(with-no-warnings
1967+
(defun bc-bt-bar (a) (bc-bt-baz a))
1968+
(defun bc-bt-foo (a) (bc-bt-bar a))))
19681969
(after-all
19691970
(fmakunbound 'bc-bt-foo)
19701971
(fmakunbound 'bc-bt-bar)
@@ -2012,6 +2013,8 @@ before it's processed by other functions."
20122013
(bc-bt-foo long-string)
20132014
:to-be-truthy)))
20142015
(setq test-suites buttercup-suites)))
2016+
(after-each
2017+
(setq test-suites nil))
20152018
(it "`crop' should print truncated lines"
20162019
(with-local-buttercup
20172020
:suites test-suites :reporter #'backtrace-reporter

0 commit comments

Comments
 (0)