Windows does not support POSIX file permissions, causing 4 test failures on Windows CI. Skip these tests until the proper ReplaceFileW fix lands.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
from fastmcp import FastMCP
|
||||
@@ -386,6 +387,9 @@ class TestHashlineEditAutoCleanup:
|
||||
|
||||
|
||||
class TestHashlineEditAtomicWrite:
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32", reason="POSIX permissions not supported on Windows"
|
||||
)
|
||||
def test_preserves_permissions(self, tools, tmp_path):
|
||||
"""Atomic write preserves original file permissions."""
|
||||
hashline_edit = tools[0]["hashline_edit"]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
@@ -962,6 +963,9 @@ class TestAtomicityWithReplace:
|
||||
class TestAtomicWrite:
|
||||
"""Tests for atomic write behavior."""
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32", reason="chmod on directories not supported on Windows"
|
||||
)
|
||||
def test_atomic_write_preserves_original_on_write_failure(
|
||||
self, hashline_edit_fn, mock_workspace, mock_secure_path, tmp_path
|
||||
):
|
||||
@@ -1283,6 +1287,9 @@ class TestAllowMultiple:
|
||||
class TestPermissionsPreservation:
|
||||
"""Tests for file permissions preservation during atomic write."""
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32", reason="POSIX permissions not supported on Windows"
|
||||
)
|
||||
@pytest.mark.parametrize("mode", [0o755, 0o644])
|
||||
def test_permissions_preserved_after_edit(
|
||||
self, hashline_edit_fn, mock_workspace, mock_secure_path, tmp_path, mode
|
||||
|
||||
Reference in New Issue
Block a user