Skip to content

tests: skip the symlink functional test on Windows - #11360

Open
iam-kira wants to merge 2 commits into
pylint-dev:mainfrom
iam-kira:fix/skip-symlink-functional-test-on-windows
Open

tests: skip the symlink functional test on Windows#11360
iam-kira wants to merge 2 commits into
pylint-dev:mainfrom
iam-kira:fix/skip-symlink-functional-test-on-windows

Conversation

@iam-kira

@iam-kira iam-kira commented Aug 28, 2026

Copy link
Copy Markdown

Type of Changes

Type
🐛 Bug fix

Description

Closes #11359

tests/functional/s/symlink/_binding/ is tracked as symlinks (mode 120000). On
Windows, git sets core.symlinks=false unless the user is elevated or has Developer
Mode enabled, and materialises those entries as regular text files containing the link
target:

$ cat tests/functional/s/symlink/_binding/symlink_module.py
../symlink_module/symlink_module.py

pylint lints that path string as Python, reports syntax-error, and
test_functional[symlink_module0] fails.

CI does not catch this: the windows-latest job materialises the symlink, so the suite
is 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_platforms mechanism, as bad_char_carriage_return and
super_init_not_called_extensions_py310 already do. A .internal changelog fragment is
included.

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 failed
  • The symlink_module0 case now skips with Test cannot run on platform 'win32'; the
    sibling symlink_module test still runs and passes

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.
@iam-kira iam-kira changed the title Fix/skip symlink functional test on windows tests: skip the symlink functional test on Windows Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_functional[symlink_module0] fails on any Windows checkout without symlink privilege

1 participant