Message409161
I also use comments in lieu of docstrings for text_xyx methods because I find the addition of the first line of the docstring in error reports to be useless, distracting, and sometimes, depending on the content, confusing. If the error is in the test method, the full comment is available when looking back at the method code. If the error is in the tested code, the comment/docstring is inapplicable.
When I edit test files, I run them directly from an IDLE editor via the 'if __name__' clause. When I run all IDLE tests from Command Prompt, I usually run 'python -m test.test_idle'. (Similar but not necessarily identical to 'python -m -ugui test_idle'.) So fiddling with regrtest will not help in either case.
Based on the above, the following seems to work.
runner = unittest.TextTestRunner(descriptions=False, verbosity=2)
unittest.main(testRunner=runner)
I am not sure what passing a runner does, versus leaving the default None, but the verbosity passed to the runner overrides and verbosity argument passed to main. What I would like is 'descriptions' added as a parameter to main, so that
unittest.main(descriptions=False, verbosity=2)
would work. |
|
Date |
User |
Action |
Args |
2021-12-24 22:52:24 | terry.reedy | set | recipients:
+ terry.reedy, jaraco, ethan.furman |
2021-12-24 22:52:24 | terry.reedy | set | messageid: <1640386344.94.0.743455838325.issue46126@roundup.psfhosted.org> |
2021-12-24 22:52:24 | terry.reedy | link | issue46126 messages |
2021-12-24 22:52:24 | terry.reedy | create | |
|