gh-143866: Verify return value of pathlib write methods in tests#143870
gh-143866: Verify return value of pathlib write methods in tests#143870sobolevn merged 6 commits into
Conversation
|
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 |
Sorry, something went wrong.
|
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 |
Sorry, something went wrong.
|
Ok, i am changed it. Can you add "skip news" label please? |
Sorry, something went wrong.
|
Why its failing? |
Sorry, something went wrong.
b727c7c to
7a8dd6f
Compare
January 16, 2026 17:54
|
Some flakiness I think. |
Sorry, something went wrong.
|
How? |
Sorry, something went wrong.
cb6a662
into
python:main
Jan 19, 2026
…methods in tests (pythonGH-143870) (cherry picked from commit cb6a662) Co-authored-by: b9788213 <b9788213@gmail.com> Co-authored-by: sobolevn <mail@sobolevn.me>
|
Sorry, @b9788213 and @sobolevn, I could not cleanly backport this to |
Sorry, something went wrong.
|
Yes, but i dont how to do. |
Sorry, something went wrong.
|
See this command here: #143870 (comment) |
Sorry, something went wrong.
|
Ok, i think i have made it succesfully. |
Sorry, something went wrong.
…methods in tests (python#143870) Co-authored-by: sobolevn <mail@sobolevn.me>
Description
This PR adds assertions to ensure that
pathlib.Path.write_text()andpathlib.Path.write_bytes()correctly return the number of bytes written.Currently, the tests only verify the side effects (file content), which means a regression (like accidentally removing the
returnstatement) would go unnoticed.Linked Issue
Fixes #143866