Message384158
Thanks for the thorough feedback Steven (and happy new year).
About -m flag: we could use -k as other testing frameworks use (pytest), or even -t.
About selecting multiple indexes: what you described is my exact use case, as I have a lot of failing examples in one method with verbose output, and also the examples depend on previous examples to be able to run, I'm currently debugging with `-m Ground.step:3,4,6,7`.
So I think you have very valid points, and I'd like to find a way to make the extra overhead be worth it:
* Currently the failing case output is f'File "{path}", line {line}, in {name}': we can add the index as f'File "{path}", line {line}, in {name}, example {index}', so it would be easy to know the indexes
* I think globs in the pattern have been very useful to me in the past (with frameworks that allowed it), because sometimes similarly named functions can have the same types of errors you try to focus on. In any case, it looks like less effort to allow arbitrary globs rather than matching on module name parts
I understand I'm adding complexity, and if we could support the same behaviour in a simpler way I'd be glad to attempt that. In the very least I think allowing a `finder=None` argument in `testmod` would allow more complex solutions, even if they are not accepted in `doctest`.
In the end I'd welcome even a small improvement (for my personal usecase). |
|
Date |
User |
Action |
Args |
2021-01-01 09:40:34 | costas-basdekis | set | recipients:
+ costas-basdekis, tim.peters, steven.daprano |
2021-01-01 09:40:34 | costas-basdekis | set | messageid: <1609494034.49.0.04464209676.issue42797@roundup.psfhosted.org> |
2021-01-01 09:40:34 | costas-basdekis | link | issue42797 messages |
2021-01-01 09:40:34 | costas-basdekis | create | |
|