8000 [3.11] gh-97590: Update docs and tests for ftplib.FTP.voidcmd() (GH-96825) by miss-islington · Pull Request #115602 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] gh-97590: Update docs and tests for ftplib.FTP.voidcmd() (GH-96825) #115602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/ftplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ FTP objects
.. method:: FTP.voidcmd(cmd)

Send a simple command string to the server and handle the response. Return
nothing if a response code corresponding to success (codes in the range
200--299) is received. Raise :exc:`error_reply` otherwise.
the response string if the response code corresponds to success (codes in
the range 200--299). Raise :exc:`error_reply` otherwise.

.. audit-event:: ftplib.sendcmd self,cmd ftplib.FTP.voidcmd

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_ftplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ def test_set_pasv(self):
self.assertFalse(self.client.passiveserver)

def test_voidcmd(self):
self.client.voidcmd('echo 200')
self.client.voidcmd('echo 299')
self.assertEqual(self.client.voidcmd('echo 200'), '200')
self.assertEqual(self.client.voidcmd('echo 299'), '299')
self.assertRaises(ftplib.error_reply, self.client.voidcmd, 'echo 199')
self.assertRaises(ftplib.error_reply, self.client.voidcmd, 'echo 300')

Expand Down
0