tests: skip the symlink functional test on Windows - #11360
Open
iam-kira wants to merge 2 commits into
Open
Conversation
git sets core.symlinks=false on Windows unless the user is elevated or has Developer Mode enabled, and materialises tests/functional/s/symlink/_binding/ as regular text files containing the link target. pylint then lints that path string as Python and reports syntax-error, failing test_functional. CI does not see this: the windows-latest job materialises the symlink, so the suite is green there and red on an ordinary Windows contributor's machine. Use the existing exclude_platforms mechanism, as bad_char_carriage_return and super_init_not_called_extensions_py310 already do.
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.
Type of Changes
Description
Closes #11359
tests/functional/s/symlink/_binding/is tracked as symlinks (mode120000). OnWindows, git sets
core.symlinks=falseunless the user is elevated or has DeveloperMode enabled, and materialises those entries as regular text files containing the link
target:
pylint lints that path string as Python, reports
syntax-error, andtest_functional[symlink_module0]fails.CI does not catch this: the
windows-latestjob materialises the symlink, so the suiteis green there and red on an ordinary Windows contributor's machine. It is the only
failure in a full run on Windows (
1 failed, 2182 passed, 262 skipped, 5 xfailed).This uses the existing
exclude_platformsmechanism, asbad_char_carriage_returnandsuper_init_not_called_extensions_py310already do. A.internalchangelog fragment isincluded.
Known trade-off: this also skips on CI Windows, where the test currently passes and
provides real coverage. If you would rather keep that, I am happy to switch to a
documentation note (enable Developer Mode, or clone with
git -c core.symlinks=true)instead — the issue lays out both options.
Testing
pytest tests/test_functional.py→ 892 passed, 40 skipped, 0 failedsymlink_module0case now skips withTest cannot run on platform 'win32'; thesibling
symlink_moduletest still runs and passes