bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#51941: Detect duplication of ERT tests


From: Mattias Engdegård
Subject: bug#51941: Detect duplication of ERT tests
Date: Fri, 19 Nov 2021 10:33:42 +0100

19 nov. 2021 kl. 06.28 skrev Lars Ingebrigtsen <larsi@gnus.org>:

>> Seems to me that making "should" only be defined within tests would have
>> flagged these (https://debbugs.gnu.org/28385).
> 
> But like I said there, using `should' outside tests is really convenient
> when developing.

You are both right -- apart from the development convenience, functions form an 
important abstraction mechanism in Lisp and they can be valuable for 
decomposing test code (although I don't think I've ever done so myself). On the 
other hand, disallowing them outside `ert-deftest` might help eliminate the 
mistakes that we are talking about.

A quick scan finds 365 occurrences of `should`, `should-not` and `should-error` 
inside defuns in the test/ subtree.






reply via email to

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