Terry J. Reedy <[email protected]> added the comment:
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.
----------
nosy: +terry.reedy -eric.araujo
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46126>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com