diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e3783e6..f07c7b42 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,11 +66,11 @@ jobs: - os: macos-latest python-version: "3.8" - os: macos-latest - python-version: "3.12" + python-version: "3.13" - os: windows-latest python-version: "3.8" - os: windows-latest - python-version: "3.12" + python-version: "3.13" runs-on: ${{ matrix.os }} needs: changed-files if: | diff --git a/tests/test_fileio.py b/tests/test_fileio.py index f72c30cb..61725a47 100644 --- a/tests/test_fileio.py +++ b/tests/test_fileio.py @@ -192,9 +192,14 @@ def test_as_uri(self) -> None: reason="Path.from_uri() is only available on Python 3.13+", ) def test_from_uri(self) -> None: - path = Path.from_uri("file:///foo/bar") + if platform.system() == "Windows": + uri = "file:///C:/foo/bar" + else: + uri = "file:///foo/bar" + + path = Path.from_uri(uri) assert isinstance(path, Path) - assert path.as_uri() == "file:///foo/bar" + assert path.as_uri() == uri async def test_cwd(self) -> None: result = await Path.cwd() @@ -382,6 +387,9 @@ async def test_hardlink_to(self, tmp_path: pathlib.Path) -> None: assert path.stat().st_nlink == 2 assert target.stat().st_nlink == 2 + @pytest.mark.skipif( + platform.system() == "Windows", reason="lchmod() does not work on Windows" + ) @pytest.mark.skipif( not hasattr(os, "lchmod"), reason="os.lchmod() is not available" )