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 steven.daprano
Recipients costas-basdekis, steven.daprano, tim.peters
Date 2020-12-31.23:39:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609457941.36.0.276598992482.issue42797@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-12-31 23:39:01steven.dapranosetrecipients: + steven.daprano, tim.peters, costas-basdekis
2020-12-31 23:39:01steven.dapranosetmessageid: <1609457941.36.0.276598992482.issue42797@roundup.psfhosted.org>
2020-12-31 23:39:01steven.dapranolinkissue42797 messages
2020-12-31 23:39:01steven.dapranocreate