From f9219eec5a67e3a9daf8300d9419a4b4f38eabc2 Mon Sep 17 00:00:00 2001 From: barneygale Date: Mon, 22 Jul 2024 04:59:06 +0100 Subject: [PATCH] Undo unnecessary change --- Lib/test/test_pathlib/test_pathlib_abc.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_pathlib/test_pathlib_abc.py b/Lib/test/test_pathlib/test_pathlib_abc.py index 9a0a8ae2d9017a..e4fd0fd9339c4f 100644 --- a/Lib/test/test_pathlib/test_pathlib_abc.py +++ b/Lib/test/test_pathlib/test_pathlib_abc.py @@ -1536,14 +1536,13 @@ def unlink(self, missing_ok=False): elif not missing_ok: raise FileNotFoundError(errno.ENOENT, "File not found", path) - def rmdir(self, missing_ok=False): + def rmdir(self): path_obj = self.parent.resolve(strict=True) / self.name path = str(path_obj) if path in self._files or path in self._symlinks: raise NotADirectoryError(errno.ENOTDIR, "Not a directory", path) elif path not in self._directories: - if not missing_ok: - raise FileNotFoundError(errno.ENOENT, "File not found", path) + raise FileNotFoundError(errno.ENOENT, "File not found", path) elif self._directories[path]: raise OSError(errno.ENOTEMPTY, "Directory not empty", path) else: