branch: externals/debbugs commit 2db1026190aa3b5366e8568e3900ce5a5bc4c944 Author: Morgan Smith <morgan.j.sm...@outlook.com> Commit: Michael Albinus <michael.albi...@gmx.de>
tests: Use 'unwind-protect' to ensure test cleanup always occurs * test/debbugs-test-helpers.el(ert-deftest--debbugs): Use 'unwind-protect'. --- test/debbugs-test-helpers.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/debbugs-test-helpers.el b/test/debbugs-test-helpers.el index f98bab40ed..7ea6f00dce 100644 --- a/test/debbugs-test-helpers.el +++ b/test/debbugs-test-helpers.el @@ -136,9 +136,11 @@ These mock functions are needed to make the tests reproducible." (doc-string 3) (indent 2)) `(ert-deftest ,name ,args ,docstring - (debbugs-test--setup) - ,@body - (debbugs-test--teardown))) + (unwind-protect + (progn + (debbugs-test--setup) + ,@body) + (debbugs-test--teardown)))) (provide 'debbugs-test-helpers)