@@ -114,7 +114,7 @@ async def test_move(
114
114
115
115
@pytest .mark .parametrize ("exclusive" , [True , False ])
116
116
def test_atomic_write_successful (tmp_path : pathlib .Path , exclusive : bool ) -> None :
117
- path = pathlib . Path ( tmp_path ) / "data"
117
+ path = tmp_path / "data"
118
118
with _atomic_write (path , "wb" , exclusive = exclusive ) as f :
119
119
f .write (b"abc" )
120
120
assert path .read_bytes () == b"abc"
@@ -123,7 +123,7 @@ def test_atomic_write_successful(tmp_path: pathlib.Path, exclusive: bool) -> Non
123
123
124
124
@pytest .mark .parametrize ("exclusive" , [True , False ])
125
125
def test_atomic_write_incomplete (tmp_path : pathlib .Path , exclusive : bool ) -> None :
126
- path = pathlib . Path ( tmp_path ) / "data"
126
+ path = tmp_path / "data"
127
127
with pytest .raises (RuntimeError ): # noqa: PT012
128
128
with _atomic_write (path , "wb" , exclusive = exclusive ) as f :
129
129
f .write (b"a" )
@@ -133,7 +133,7 @@ def test_atomic_write_incomplete(tmp_path: pathlib.Path, exclusive: bool) -> Non
133
133
134
134
135
135
def test_atomic_write_non_exclusive_preexisting (tmp_path : pathlib .Path ) -> None :
136
- path = pathlib . Path ( tmp_path ) / "data"
136
+ path = tmp_path / "data"
137
137
with path .open ("wb" ) as f :
138
138
f .write (b"xyz" )
139
139
assert path .read_bytes () == b"xyz"
@@ -144,7 +144,7 @@ def test_atomic_write_non_exclusive_preexisting(tmp_path: pathlib.Path) -> None:
144
144
145
145
146
146
def test_atomic_write_exclusive_preexisting (tmp_path : pathlib .Path ) -> None :
147
- path = pathlib . Path ( tmp_path ) / "data"
147
+ path = tmp_path / "data"
148
148
with path .open ("wb" ) as f :
149
149
f .write (b"xyz" )
150
150
assert path .read_bytes () == b"xyz"
0 commit comments