Skip to content

[3.13] gh-67765: Add tests for wsgiref.validate (GH-112398) - #155625

Merged
serhiy-storchaka merged 2 commits into
python:3.13from
serhiy-storchaka:backport-e96cf73-3.13
Aug 12, 2026
Merged

[3.13] gh-67765: Add tests for wsgiref.validate (GH-112398)#155625
serhiy-storchaka merged 2 commits into
python:3.13from
serhiy-storchaka:backport-e96cf73-3.13

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 12, 2026

Copy link
Copy Markdown
Member

Cover the InputWrapper and ErrorWrapper methods of wsgiref.validate: read, readline, readlines, __iter__, write, writelines and flush.
Each is tested both for the AssertionError raised on an invalid call and for the data passed through on a valid one.

assertEndsWith() and assertStartsWith() do not exist in 3.13, so the assertions use assertTrue(... .endswith(...)) and assertTrue(... .startswith(...)), matching the style already used in this file.

(cherry picked from commit e96cf73)

Co-authored-by: Amuthan Mannar amuthanmannar4@gmail.com
Co-authored-by: Alex Shkop a.v.shkop@gmail.com

🤖 Generated with Claude Code

Cover the InputWrapper and ErrorWrapper methods of wsgiref.validate:
read, readline, readlines, __iter__, write, writelines and flush.
Each is tested both for the AssertionError raised on an invalid call
and for the data passed through on a valid one.

Co-authored-by: Alex Shkop <a.v.shkop@gmail.com>
(cherry picked from commit e96cf73)
assertStartsWith() and assertEndsWith() are provided by
test.support.testcase.ExtraAssertions in 3.13, so the new tests can be
kept identical to the 3.14+ version.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka merged commit 7fd9801 into python:3.13 Aug 12, 2026
41 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the backport-e96cf73-3.13 branch August 12, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants