This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author costas-basdekis
Recipients costas-basdekis, steven.daprano, tim.peters
Date 2021-01-01.09:40:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609494034.49.0.04464209676.issue42797@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2021-01-01 09:40:34costas-basdekissetrecipients: + costas-basdekis, tim.peters, steven.daprano
2021-01-01 09:40:34costas-basdekissetmessageid: <1609494034.49.0.04464209676.issue42797@roundup.psfhosted.org>
2021-01-01 09:40:34costas-basdekislinkissue42797 messages
2021-01-01 09:40:34costas-basdekiscreate