]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-86533: Make Path.mkdir parent_mode tests umask-independent (#150040)
authorGregory P. Smith <68491+gpshead@users.noreply.github.com>
Tue, 19 May 2026 01:19:06 +0000 (18:19 -0700)
committerGitHub <noreply@github.com>
Tue, 19 May 2026 01:19:06 +0000 (01:19 +0000)
commit68ebc051fc8285a06352195c22abdc1e1c7ec37c
tree920ef6a44a5e5e5145a59bde1946254f97c1283d
parent17eb17d43f66a0f7985fca05c7c9684bc01fabcd
gh-86533: Make Path.mkdir parent_mode tests umask-independent (#150040)

test_mkdir_with_parent_mode, test_mkdir_parent_mode_deep_hierarchy and
test_mkdir_parent_mode_same_as_mode assert exact directory mode bits but
did not pin the process umask.  On buildbots running with a restrictive
umask (e.g. 0o077) the 0o755 leaf was masked down to 0o700, failing the
assertions.  Wrap them in os_helper.temp_umask(0o022), matching the
other umask-aware mkdir tests in this file.
Lib/test/test_pathlib/test_pathlib.py