From 220203cdcce2ea3128c520e918ab788e9782a88f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 25 Oct 2020 14:24:29 +0100 Subject: [PATCH] tests(tests_shutil): fix comment with check_args_to_onerror - `os.unlink` is used since 2100b42317. - `os.rmdir` is used since 67be92bed4. (Note that the special case for Linux/ZFS is not covered [1], and might actually not work anymore since the changes around handling/setting `self.errorState`.) 1: https://codecov.io/gh/python/cpython/src/492d513ccb/Lib/test/test_shutil.py#L354...355 Ref: https://bugs.python.org/issue4489 --- Lib/test/test_shutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index df7fbedf24a7c2..df4dad77a5097b 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -339,8 +339,8 @@ def check_args_to_onerror(self, func, arg, exc): # on a directory that is chmod 500, which will fail. # This function is run when shutil.rmtree fails. # 99.9% of the time it initially fails to remove - # a file in the directory, so the first time through - # func is os.remove. + # the file or directory in the directory, so func + # is os.unlink or os.rmdir. # However, some Linux machines running ZFS on # FUSE experienced a failure earlier in the process # at os.listdir. The first failure may legally