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: