-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-31904: Fix test_netrc for VxWorks RTOS #21675
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
Conversation
Why is netrc not supported? Is this just a temporary workaround to get the build passing all tests? Or it is something more fundamental? If it is temporary, and likely to be fixed, then that intent should be documented near the skipif. If it is permanent, then that reason should be documented both here and in the documentation for netrc. https://docs.python.org/3.10/library/netrc.html gives no hint that it might be missing in certain operating systems, let alone excluding VxWorks in particular. And I suppose this comment applies globally to failures resolved by a skipIf, including those already integrated. |
@JimJJewett Thanks for your review.
Yes. We have updated docs in the previous merged PRs and I will keep this in mind in the following PRs. Thanks. |
test_home_not_set() in temporary directory
712a618
to
fa9db85
Compare
Misc/NEWS.d/next/Tests/2020-12-01-15-51-19.bpo-31904.iwetj4.rst
Outdated
Show resolved
Hide resolved
Lib/test/test_netrc.py
Outdated
with tempfile.TemporaryDirectory() as tmpdir: | ||
with os_helper.change_cwd(tmpdir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use temp_cwd() which does these two things as a single line.
Same remark for the two other functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
I merged your PR, thanks. The final change is no longer specific to VxWorks and it makes the code cleaner, good! |
Fix test_netrc on VxWorks: create temporary directories using temp_cwd().
VxWorks RTOS has no user home directory. So VxWorks native ftp client doesn't support auto-login feature. We also can't support this Python module. So skip the corresponding test.
https://bugs.python.org/issue31904