From 530d91c61b0f42d032fa8799824677d9204ab596 Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Thu, 28 Aug 2025 11:00:13 -0700 Subject: [PATCH] Simplify local store tests --- tests/test_store/test_local.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_store/test_local.py b/tests/test_store/test_local.py index 970bb7d374..79e8f740d4 100644 --- a/tests/test_store/test_local.py +++ b/tests/test_store/test_local.py @@ -114,7 +114,7 @@ async def test_move( @pytest.mark.parametrize("exclusive", [True, False]) def test_atomic_write_successful(tmp_path: pathlib.Path, exclusive: bool) -> None: - path = pathlib.Path(tmp_path) / "data" + path = tmp_path / "data" with _atomic_write(path, "wb", exclusive=exclusive) as f: f.write(b"abc") assert path.read_bytes() == b"abc" @@ -123,7 +123,7 @@ def test_atomic_write_successful(tmp_path: pathlib.Path, exclusive: bool) -> Non @pytest.mark.parametrize("exclusive", [True, False]) def test_atomic_write_incomplete(tmp_path: pathlib.Path, exclusive: bool) -> None: - path = pathlib.Path(tmp_path) / "data" + path = tmp_path / "data" with pytest.raises(RuntimeError): # noqa: PT012 with _atomic_write(path, "wb", exclusive=exclusive) as f: f.write(b"a") @@ -133,7 +133,7 @@ def test_atomic_write_incomplete(tmp_path: pathlib.Path, exclusive: bool) -> Non def test_atomic_write_non_exclusive_preexisting(tmp_path: pathlib.Path) -> None: - path = pathlib.Path(tmp_path) / "data" + path = tmp_path / "data" with path.open("wb") as f: f.write(b"xyz") assert path.read_bytes() == b"xyz" @@ -144,7 +144,7 @@ def test_atomic_write_non_exclusive_preexisting(tmp_path: pathlib.Path) -> None: def test_atomic_write_exclusive_preexisting(tmp_path: pathlib.Path) -> None: - path = pathlib.Path(tmp_path) / "data" + path = tmp_path / "data" with path.open("wb") as f: f.write(b"xyz") assert path.read_bytes() == b"xyz"