test(windows): skip symlink security tests when symlinks unavailable - #616
Open
Adkr1989 wants to merge 1 commit into
Open
test(windows): skip symlink security tests when symlinks unavailable#616Adkr1989 wants to merge 1 commit into
Adkr1989 wants to merge 1 commit into
Conversation
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Four symlink-refusal security tests fail on stock Windows with
OSError: [WinError 1314]— creating symlinks there requires admin rights orDeveloper Mode, so
pytest tests/is red out of the box on a default Windowssetup (verified on Windows 11, Python 3.11):
test_channels.py::TestXiaoHongShuChannel::test_saved_cli_cookie_refuses_ancestor_symlinktest_channels.py::TestGitHubChannel::test_hosts_metadata_refuses_ancestor_symlinktest_reddit_channel.py::test_check_rdt_refuses_symlink_credentialtest_reddit_channel.py::test_check_rdt_refuses_ancestor_symlinkFix
Wrap the
symlink_tosetup calls in the try/except-skip guard this suitealready uses in
tests/test_private_file_writes.py("symlinks are notsupported on this platform"). A blanket
skipif(win32)was deliberately NOTused: on Windows with Developer Mode enabled the tests can and should still run.
No behavior under test changes; only test setup gains the same capability
guard as its sibling file. After this change the full suite is green on stock
Windows: 554 passed, 32 skipped, 0 failed.