]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 21 Jan 2022 17:31:25 +0000 (09:31 -0800)
committerGitHub <noreply@github.com>
Fri, 21 Jan 2022 17:31:25 +0000 (19:31 +0200)
commita1015c6478e8cbec2ecb984a3cba733783d168b5
tree6c01b38528b9c58afbbcf6d5fd4e1d011b604b9f
parent68a31dba975419b7b4432fa31730e5ca67071d9f
bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739)

Ensure that directory file descriptors refer to directories different
from the current directory, and that src_dir_fd and dst_dir_fd refer
to different directories.

Add context manager open_dir_fd() in test.support.os_helper.
(cherry picked from commit 54610bb448a9cf5be77d53b66169fca4c11be6cb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/support/os_helper.py
Lib/test/test_os.py
Lib/test/test_posix.py