You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better integration of doctest with unittest and libregrtest #108885
A side effect of migration to the unittest test runner (a long process finished in #89392) was the change in the output in verbose mode. In older version, when test.support.run_doctest() was used to run doctests, it outputted all doctest details when regrtests are run with -v. Now doctests are wrapped in doctest.DocTestClass and only test name is shown when regrtests are run with -v.
The former behavior was too verbose, the current behavior is too terse. I want the following behavior:
When regrtests are run without -v, do not output anything.
When regrtests are run with single -v, output only doctest name, as for other test cases.
When regrtests are run with -vv, output detailed doctest output.
Every example count as a subtest.
When some example fails, count it as failing subtest, and output detailed reports for every failed example. It should not include details of successful examples (except when run with -vv).
It would be nice to integrate it also with the unittest CLI, but taking into account that it needs two -vs to show test case names and will need three -vs to show doctest details.
It means that we should found a way to pass verbosity level to doctests and run every example within TestCase.subTest().
#134890 makes each example to be reported as a subtest, but the main goal -- control doctestі verbosity through unittest and libregrtest -- has not yet been achieved.
Activity
pythongh-108885: Imporove tests for doctest
pythongh-108885: Imporove tests for doctest
gh-108885: Imporove tests for doctest (GH-134832)
pythongh-108885: Imporove tests for doctest (pythonGH-134832)
pythongh-108885: Imporove tests for doctest (pythonGH-134832)
[3.13] gh-108885: Imporove tests for doctest (GH-134832) (GH-134856)
[3.14] gh-108885: Imporove tests for doctest (GH-134832) (GH-134855)
1 remaining item
pythongh-108885: Use subtests for doctest examples run by unittest
gh-108885: Use subtests for doctest examples run by unittest (GH-134890
serhiy-storchaka commentedon May 31, 2025
#134890 makes each example to be reported as a subtest, but the main goal -- control doctestі verbosity through unittest and libregrtest -- has not yet been achieved.
pythongh-108885: Imporove tests for doctest (pythonGH-134832)
pythongh-108885: Use subtests for doctest examples run by unittest (p…
pythongh-108885: Imporove tests for doctest (pythonGH-134832)
pythongh-108885: Use subtests for doctest examples run by unittest (p…
pythongh-108885: Imporove tests for doctest (pythonGH-134832)
Add support for Python 3.15 (#206)
gh-108885: Report the examples of a doctest run by unittest (GH-155377)
Update python-zope.testrunner to version 8.3 / rev 32 via SR 1374982
pythongh-108885: Report the examples of a doctest run by unittest (py…