Skip to content

Commit 710f5df

Browse files
authored
Simplify local store tests (#3414)
1 parent 96a531b commit 710f5df

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
@@ -114,7 +114,7 @@ async def test_move(
114114

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

124124
@pytest.mark.parametrize("exclusive", [True, False])
125125
def test_atomic_write_incomplete(tmp_path: pathlib.Path, exclusive: bool) -> None:
126-
path = pathlib.Path(tmp_path) / "data"
126+
path = tmp_path / "data"
127127
with pytest.raises(RuntimeError): # noqa: PT012
128128
with _atomic_write(path, "wb", exclusive=exclusive) as f:
129129
f.write(b"a")
@@ -133,7 +133,7 @@ def test_atomic_write_incomplete(tmp_path: pathlib.Path, exclusive: bool) -> Non
133133

134134

135135
def test_atomic_write_non_exclusive_preexisting(tmp_path: pathlib.Path) -> None:
136-
path = pathlib.Path(tmp_path) / "data"
136+
path = tmp_path / "data"
137137
with path.open("wb") as f:
138138
f.write(b"xyz")
139139
assert path.read_bytes() == b"xyz"
@@ -144,7 +144,7 @@ def test_atomic_write_non_exclusive_preexisting(tmp_path: pathlib.Path) -> None:
144144

145145

146146
def test_atomic_write_exclusive_preexisting(tmp_path: pathlib.Path) -> None:
147-
path = pathlib.Path(tmp_path) / "data"
147+
path = tmp_path / "data"
148148
with path.open("wb") as f:
149149
f.write(b"xyz")
150150
assert path.read_bytes() == b"xyz"

0 commit comments

Comments
 (0)