jorgenschaefer / emacs-buttercup

Behavior-Driven Emacs Lisp Testing
GNU General Public License v3.0
360 stars 44 forks source link

Optionally don't print backtraces #190

Closed doublep closed 3 years ago

doublep commented 3 years ago

Related to #185 somewhat.

Add another backtrace style omit. If specified, backtraces should not be printed at all.

Rationale: if expect fails, and said expect is the only one in its test (sometimes also if not the only), backtrace gives no additional information (you know where the error happened), only clutters output. I very often use similar Eldev-specific functionality for ERT. Would be nice if Buttercupt just supported this out-of-the-box.

doublep commented 3 years ago

To clarify: for ERT I use a home-grown extension in Eldev integration code that achieves this. For Buttercup I could in principle do the same, but in this case I hope that reasonable improvements are instead integrated into upstream, so that integration code could just use (setf buttercup-stack-frame-style 'omit) or something like that, instead of adding yet another hack.

snogge commented 3 years ago

I see no problem adding an omit style.

snogge commented 3 years ago

@doublep, is the style produced by #197 what you had in mind?

doublep commented 3 years ago

Yeah, something like that. Apparently the after-the-tests block should really not be printed (like you did), since the only extra information it provides is the backtraces, which, in this case, are explicitly asked to be omitted.