Skip to content

Commit de0e0a8

Browse files
authored
Merge branch 'main' into no-partial-writes
2 parents 6cd571f + 710f5df commit de0e0a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_store/test_local.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async def test_move(
111111

112112
@pytest.mark.parametrize("exclusive", [True, False])
113113
def test_atomic_write_successful(tmp_path: pathlib.Path, exclusive: bool) -> None:
114-
path = pathlib.Path(tmp_path) / "data"
114+
path = tmp_path / "data"
115115
with _atomic_write(path, "wb", exclusive=exclusive) as f:
116116
f.write(b"abc")
117117
assert path.read_bytes() == b"abc"
@@ -120,7 +120,7 @@ def test_atomic_write_successful(tmp_path: pathlib.Path, exclusive: bool) -> Non
120120

121121
@pytest.mark.parametrize("exclusive", [True, False])
122122
def test_atomic_write_incomplete(tmp_path: pathlib.Path, exclusive: bool) -> None:
123-
path = pathlib.Path(tmp_path) / "data"
123+
path = tmp_path / "data"
124124
with pytest.raises(RuntimeError): # noqa: PT012
125125
with _atomic_write(path, "wb", exclusive=exclusive) as f:
126126
f.write(b"a")
@@ -130,7 +130,7 @@ def test_atomic_write_incomplete(tmp_path: pathlib.Path, exclusive: bool) -> Non
130130

131131

132132
def test_atomic_write_non_exclusive_preexisting(tmp_path: pathlib.Path) -> None:
133-
path = pathlib.Path(tmp_path) / "data"
133+
path = tmp_path / "data"
134134
with path.open("wb") as f:
135135
f.write(b"xyz")
136136
assert path.read_bytes() == b"xyz"
@@ -141,7 +141,7 @@ def test_atomic_write_non_exclusive_preexisting(tmp_path: pathlib.Path) -> None:
141141

142142

143143
def test_atomic_write_exclusive_preexisting(tmp_path: pathlib.Path) -> None:
144-
path = pathlib.Path(tmp_path) / "data"
144+
path = tmp_path / "data"
145145
with path.open("wb") as f:
146146
f.write(b"xyz")
147147
assert path.read_bytes() == b"xyz"

0 commit comments

Comments
 (0)