Message384142
I think that -m is unacceptable as it will clash with Python's -m option.
I'm not convinced that this added complexity will provide enough benefit to make it worth while. I can see myself spending an order of magnitude more time trying to work out why my test suffixes and indexes are selecting the wrong tests than I would save.
The use of indexes to select individual tests within a single docstring is especially fragile and error-prone since it requires counting by the user. It's also likely to introduce artificial errors since tests can rely on side-effects of previous tests, e.g.
>>> import math
>>> math.sqrt(25)
5.0
Selecting test number 1 alone will fail unless test number 0 is also run. For these reasons, I think that in practice, the finest selection unit we can run is a single docstring. Trying to select individual tests within a unit is likely to be far too fragile and error prone to be practical.
So by my estimation, we have the following selections:
- module docstring alone
- named function or class docstring alone
- named class.method docstring alone
- named class and all its methods |
|
Date |
User |
Action |
Args |
2020-12-31 23:39:01 | steven.daprano | set | recipients:
+ steven.daprano, tim.peters, costas-basdekis |
2020-12-31 23:39:01 | steven.daprano | set | messageid: <1609457941.36.0.276598992482.issue42797@roundup.psfhosted.org> |
2020-12-31 23:39:01 | steven.daprano | link | issue42797 messages |
2020-12-31 23:39:01 | steven.daprano | create | |
|