Skip to content

fix: skip Unix permission test on Windows (#648)#652

Open
Stark-SK wants to merge 1 commit into
usestrix:mainfrom
Stark-SK:fix/issue-stark
Open

fix: skip Unix permission test on Windows (#648)#652
Stark-SK wants to merge 1 commit into
usestrix:mainfrom
Stark-SK:fix/issue-stark

Conversation

@Stark-SK

@Stark-SK Stark-SK commented Jul 3, 2026

Copy link
Copy Markdown

Summary

Skips test_persist_current_sets_0600_mode on Windows because Unix file permissions (0o600) are not supported on Windows.

Problem

On Windows, target.stat().st_mode & 0o777 returns 33206 (regular file), causing the assertion == 0o600 to fail. This blocks Windows contributors from running the test suite cleanly.

Fix

Added @pytest.mark.skipif(os.name == 'nt', ...) decorator to skip this test on Windows.

Testing

  • uv run pytest tests/test_config_loader.py::test_persist_current_sets_0600_mode -v -> SKIPPED on Windows
  • make check-all (ruff, mypy, pre-commit) passes

Fixes #648

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR skips a Unix-specific config loader test on native Windows. The main changes are:

  • Added os for platform detection in tests/test_config_loader.py.
  • Added a pytest skip marker to the 0o600 file mode test on Windows.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The skip condition matches the native Windows case that cannot support the Unix permission assertion.
  • The test still runs on POSIX platforms.

Important Files Changed

Filename Overview
tests/test_config_loader.py Adds a Windows skip for the POSIX permission assertion and imports os for the skip condition.

Reviews (1): Last reviewed commit: "fix: skip Unix permission test on Window..." | Re-trigger Greptile

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.

[BUG] test_persist_current_sets_0600_mode fails on Windows - Unix file permissions not supported

1 participant