Fix Windows compatibility issues

This commit is contained in:
thePR0M3TH3AN
2025-07-05 13:15:13 -04:00
parent 9e1880c3c7
commit 14354ca4e3
4 changed files with 16 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
import os
import threading
from pathlib import Path
@@ -20,6 +21,10 @@ def _reader(path: Path, results: list[str], exceptions: list[str]) -> None:
exceptions.append(repr(e))
import pytest
@pytest.mark.skipif(os.name == "nt", reason="Windows lacks reliable shared locks")
def test_concurrent_shared_and_exclusive_lock(tmp_path: Path) -> None:
file_path = tmp_path / "data.txt"
file_path.write_text("init")