Repository navigation
gh-131178: Add tests for ftplib command-line interface - #161080
Conversation
Add unit tests in Lib/test/test_ftplib.py covering the ftplib command-line interface: verifying usage message on empty invocation, subprocess invocation, host connection with debuglevel, directory and passive mode commands, file retrieval, and custom netrc file error handling.
|
Could you check the failures in the CI? |
… netrc in ftplib CLI tests
|
Hi @orsenthil, The initial failure was caused by missing parentheses on I pushed commit 2f1b646 to fix the decorator invocation to All test jobs across all platforms have now passed. Please let me know if any further changes are needed. |
…lib.rst Don't need this for the test only enhancement.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Thanks @rudy-07 for the PR, and @orsenthil for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
|
|
|
Thanks for merging! I noticed the buildbot failure in test_cli_retrieve_file caused by sys.stdout lacking a .buffer attribute under regrtest. I will open a follow-up PR shortly to mock sys.stdout properly. |
|
|
I opened a follow-up PR to fix the sys.stdout.buffer AttributeError in est_cli_retrieve_file: #161135. |
|
Thanks @rudy-07 for the PR, and @orsenthil for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @rudy-07 for the PR, and @orsenthil for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-161153 is a backport of this pull request to the 3.14 branch. |
|
GH-161154 is a backport of this pull request to the 3.15 branch. |
Add unit tests in
Lib/test/test_ftplib.pycovering theftplibcommand-line interface (python -m ftplib):test.support.script_helper.assert_python_ok.-ddebugging level adjustments.-l(directory listing),-d(CWD), and-p(passive mode) command parsing.RETR).-rcustom netrc file error handling.Part of gh-131178.