[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: |
Thu, 18 Nov 2021 20:13:59 +0100 |
18 nov. 2021 kl. 18.44 skrev Lars Ingebrigtsen <larsi@gnus.org>:
> By the way, this reminds me of a different error I often make in ert
> files -- I type "defun" instead of "ert-deftest". Would it be
> productive to check whether a -tests.el file contains a defun that's
> never called?
It would certainly be good to detect such mistakes, but I'm not sure how to go
about finding them. I wrote a quick-and-dirty scanner that found about 400
uncalled functions in the test tree of which 1 or 2, maybe, should have been
`ert-deftest` (will fix those right away).
Clearly something with much better signal/noise ratio is called for. One would
be to only consider functions using `should` etc.
> But perhaps it's such a marginal problem that it's not worth checking
> for.
It's unclear how frequent this mistake is but at least now we have concrete
evidence of its existence. On the other hand, it will be found by a test author
who has adopted the standard "test first without then with the fix" ritual as
habit.
(I'm not accusing you of bad discipline; I'm probably no better myself, and in
any case berating people for being careless is not how to solve problems caused
by human mistakes.)
I may or may not have the time to try to find something better so feel free to
take a shot if you like.
- bug#51941: Detect duplication of ERT tests, Mattias Engdegård, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Lars Ingebrigtsen, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Mattias Engdegård, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Lars Ingebrigtsen, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Lars Ingebrigtsen, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Philipp Stephani, 2021/11/18
- bug#51941: Detect duplication of ERT tests,
Mattias Engdegård <=
- bug#51941: Detect duplication of ERT tests, Lars Ingebrigtsen, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Mattias Engdegård, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Glenn Morris, 2021/11/18
- bug#51941: Detect duplication of ERT tests, Lars Ingebrigtsen, 2021/11/19
- bug#51941: Detect duplication of ERT tests, Mattias Engdegård, 2021/11/19
- bug#51941: Detect duplication of ERT tests, Lars Ingebrigtsen, 2021/11/20
- bug#51941: Detect duplication of ERT tests, Mattias Engdegård, 2021/11/20
bug#51941: Detect duplication of ERT tests, Ihor Radchenko, 2021/11/24