bpo-4080: unittest durations by giampaolo · Pull Request #12271 · python/cpython · GitHub

github.com

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

don't print duration if not verbose

add cmdline arg (bool) to toggle durations

make --durations arg accept a mandatory int value

hide durations < 0.000

minor cosmetic changes

don't use bare except clause

add a public addDuration method to TestResult

fix TypeError occurring on skip

Merge branch 'master' into unittest-durations

add a couple of tests for runner

don't add durations multiple times + write durations test

don't print header if there are no durations

use example from stdlib

View reviewed changes

address PR review (amongst which, show slowest tests firsts)

update doc samples

View reviewed changes

move TextRunner test in test_runner.py

remove code which is no longer used

Merge branch 'main' into unittest-durations

View reviewed changes

Merge branch 'main' into unittest-durations

address @ezio-melotti code review comments Signed-off-by: Giampaolo Rodola <[email protected]>

View reviewed changes

Merge branch 'main' into unittest-durations

View reviewed changes

gh-48330: address review comments to PR-12271 #103209

gh-48330: assert warning is emitted on unittest.TestResult with no addDuration #103309

Add addDuration to TestCaseFunction pytest-dev/pytest#10875

GitHub tests are failing on Python 3.12 alpha 7 nose-devs/nose2#569

Leaked semaphore objects in test_concurrent_futures #104090