[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66782: 29.1; ERT tests report test redefined depending on loading se
From: |
Xiyue Deng |
Subject: |
bug#66782: 29.1; ERT tests report test redefined depending on loading sequence |
Date: |
Mon, 30 Oct 2023 13:47:53 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> 29 okt. 2023 kl. 22.53 skrev Xiyue Deng <manphiz@gmail.com>:
>
>> As far as I know, there is no practical use for a test case to depend on
>> another test case in any language I worked with as a test case provides
>> no reusable component. On the other hand, there are alternatives that
>> makes more sense to do what they (e.g. lsp-mode) are doing. Again, IMHO
>> I think it makes sense for ERT not to support it or to even forbid it.
>> Doing this also avoids such misleading error message I was reporting,
>> which got triggered depending on the loading sequence which may make
>> test suites flaky (as the loading sequence is not deterministic).
>
> I don't think ERT can forbid anyone from loading in the same .el file
> multiple times because it's none of its business. Or did you have something
> else in mind?
>
It's not that loading the same .el multiple times that caused this
error, but loading a module with `ert-deftest' and both .el modules are
passed to batch ert processing which is common practice. But see below.
> All in all, I'm not sure there is anything that we can do in Emacs right now
> that would help, but if you have any concrete suggestions, do tell.
>
I understand if upstream don't want to complicate `require' logic too
much. However I wonder whether it's OK to add warning if a required
module has `ert-deftest' in it, so that it can help people identify that
a `Test "foo" redefined' error is due to requiring other module instead
of an actual duplicated test name. How does this sound?
--
Xiyue Deng
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, (continued)
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Eli Zaretskii, 2023/10/28
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Xiyue Deng, 2023/10/28
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Eli Zaretskii, 2023/10/28
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Xiyue Deng, 2023/10/28
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Eli Zaretskii, 2023/10/28
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Mattias Engdegård, 2023/10/28
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Xiyue Deng, 2023/10/28
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Mattias Engdegård, 2023/10/29
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Xiyue Deng, 2023/10/29
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Mattias Engdegård, 2023/10/30
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence,
Xiyue Deng <=
- bug#66782: 29.1; ERT tests report test redefined depending on loading sequence, Xiyue Deng, 2023/10/28