Skip to content

Commit

Permalink
Updated macOS and Windows to test on Python 3.13 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Oct 12, 2024
1 parent 5c60291 commit a8f044b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ jobs:
- os: macos-latest
python-version: "3.9"
- os: macos-latest
python-version: "3.12"
python-version: "3.13"
- os: windows-latest
python-version: "3.9"
- os: windows-latest
python-version: "3.12"
python-version: "3.13"
runs-on: ${{ matrix.os }}
needs: changed-files
if: |
Expand Down
12 changes: 10 additions & 2 deletions tests/test_fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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"
)
Expand Down

0 comments on commit a8f044b

Please sign in to comment.