Title: Better integration of doctest with unittest and libregrtest · Issue #108885 · python/cpython · GitHub
Open Graph Title: Better integration of doctest with unittest and libregrtest · Issue #108885 · python/cpython
X Title: Better integration of doctest with unittest and libregrtest · Issue #108885 · python/cpython
Description: 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, when test.support.run_doctest() was used to run doctests, i...
Open Graph Description: 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, when test.support.r...
X Description: 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, when test.support.r...
Opengraph URL: https://github.com/python/cpython/issues/108885
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Better integration of doctest with unittest and libregrtest","articleBody":"# Feature or enhancement\n\nA 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`.\n\nThe former behavior was too verbose, the current behavior is too terse. I want the following behavior:\n\n* When regrtests are run without `-v`, do not output anything.\n* When regrtests are run with single `-v`, output only doctest name, as for other test cases.\n* When regrtests are run with `-vv`, output detailed doctest output.\n* Every example count as a subtest.\n* 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`).\n* It would be nice to integrate it also with the unittest CLI, but taking into account that it needs two `-v`s to show test case names and will need three `-v`s to show doctest details.\n\nIt means that we should found a way to pass verbosity level to doctests and run every example within `TestCase.subTest()`.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-134832\n* gh-134855\n* gh-134856\n* gh-134890\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2023-09-04T17:08:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/108885/cpython/issues/108885"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f32601d2-736a-f8a6-1fa1-5ea6bdef022b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD16:312517:E83B27:14207BD:696A868C |
| html-safe-nonce | d16a8d33ed0585207ff9161804cd31894396cfd58c7e7948095fd55ecb503505 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDE2OjMxMjUxNzpFODNCMjc6MTQyMDdCRDo2OTZBODY4QyIsInZpc2l0b3JfaWQiOiI2NzA2ODc1MjMzMDI2NjA2NzMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 294cb129cd607bd8aa8b4d76e2be4dab8720c3f3d61c2b599c4fd2fd08280f33 |
| hovercard-subject-tag | issue:1880645632 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/108885/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0e45e2b72b644f0fe555dcd7684e59630aea41b2318426cdb96b3ffd316992a6/python/cpython/issues/108885 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0e45e2b72b644f0fe555dcd7684e59630aea41b2318426cdb96b3ffd316992a6/python/cpython/issues/108885 |
| og:image:alt | 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, when test.support.r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | 913560fa317c3c5a71e34f9b19253c9f09d02b4b958a86c2a56f4c8541116377 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5998c30593994bf2589055aef7b22d368a499367 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width