cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-134567: Exposes log format to users in unittest.TestCase.assertLogs

Open garry-cairns opened this issue 7 months ago • 3 comments

Allows users optionally to pass a custom log formatter to assertLogs such that assertions match expected custom formats where they are used. Existing behavior should be unaffected.

  • Issue: gh-134567

garry-cairns avatar May 23 '25 09:05 garry-cairns

All commit authors signed the Contributor License Agreement.

CLA signed

python-cla-bot[bot] avatar May 23 '25 09:05 python-cla-bot[bot]

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

bedevere-app[bot] avatar May 23 '25 09:05 bedevere-app[bot]

@ezio-melotti @rbtcollins @gpshead @serhiy-storchaka Does anyone have any bandwidth to look a this one? I believe it will be a fairly quick either accept or reject type change.

garry-cairns avatar Jun 23 '25 15:06 garry-cairns

Please update also What's New and the versionchanged directive.

Can you clarify what's outstanding here? I thought I had addressed these with the previous commit.

garry-cairns avatar Jul 01 '25 17:07 garry-cairns

They still contain "so your assertions can match". You only changed the NEWS entry.

Ah got you, should be sorted now. Thanks for all your help and attention on this.

garry-cairns avatar Jul 02 '25 09:07 garry-cairns

LGTM. :+1:

serhiy-storchaka avatar Jul 02 '25 09:07 serhiy-storchaka