Costas Basdekis <costas.basde...@gmail.com> added the comment:

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).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42797>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to