@@ -111,7 +111,7 @@ async def test_move(
111111
112112@pytest .mark .parametrize ("exclusive" , [True , False ])
113113def 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 ])
122122def 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
132132def 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
143143def 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