Shxiao e92c2c62f7
test(wechat): skip the POSIX mode-bit half of the auth-state tests on Windows (#5366)
Two tests in test_wechat_channel.py assert that the persisted WeChat auth
state is owner-only via stat().st_mode & 0o777 == 0o600. Windows has no POSIX
mode bits: Path.chmod() only toggles the read-only attribute, so st_mode
reports 0o100666 and the assertion can never hold there (same class as the
skill-permission assertions handled in #5244).

Skip only the mode-bit assertion on Windows from a single-sourced reason
constant, and keep every platform-independent assertion running: the QR login
flow, the persisted JSON content, and the "no *.tmp residue" atomicity check.
In the tightening test the mode assertion moves after those checks so the
Windows run still verifies that the atomic owner-only temp-file path leaves no
residue behind.

Verified on Windows: both tests red on upstream main (assert (33206 & 511) ==
384), skipped after the change; the file is 32 passed, 2 skipped; ruff
check/format clean.
2026-09-12 09:00:48 +08:00
..