Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_store/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
Expand All @@ -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"
Expand All @@ -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"
Expand Down
Loading