Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Better integration of doctest with unittest and libregrtest #108885

Open
2 of 2 issues completed
Open
Assignees
serhiy-storchaka
Labels
stdlibStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirtype-featureA feature request or enhancement
@serhiy-storchaka

Description

@serhiy-storchaka

Feature or enhancement

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, whentest.support.run_doctest() was used to run doctests, it outputted all doctest details when regrtests are run with-v. Now doctests are wrapped indoctest.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 withinTestCase.subTest().

Linked PRs

Sub-issues

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirtype-featureA feature request or enhancement

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp