New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
Currently regrtest supports two ways of collecting and running tests in module. 1. If the module contains the "test_main" function, regrtest just calls it. This function usually calls run_unittest() with a list of test classes, composed manually, it can also run doctests with run_doctest(), generate list of test classes dynamically, and run some code before and after running tests. 2. Otherwise regrtest uses unittest for for collecting tests. The disadvantage of the former way is that new test classes should be added manually to the list. If you forget to do this, new tests will not be run. See for example issue45185 and issue45187. Not runned tests can hide bugs. So it would be better to eliminate human factor and detect tests automatically. ---------- assignee: serhiy.storchaka components: Tests messages: 402006 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Always use unittest for collecting tests in regrtests type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45229> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com