Skip to content

Commit 64d9635

Browse files
committed
Added ruff formatting
1 parent 3eafa0b commit 64d9635

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/test_util.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,22 @@ async def test_ensure_directory_absent(tmp_path: pathlib.Path):
3232
await ensure_absent(path)
3333
assert not await aiofiles.os.path.exists(path)
3434

35+
3536
@pytest.mark.asyncio
3637
async def test_ensure_file_absent_when_open_for_reading(tmp_path: pathlib.Path):
3738
path = tmp_path / "test_file"
3839
async with aiofiles.open(path, "w") as test_file:
3940
await test_file.write("foobar")
40-
41+
4142
# Open the file for reading
4243
async with aiofiles.open(path, "r"):
4344
pass # Simply open and close the file
4445

4546
# Ensure the file is removed
4647
await ensure_absent(path)
4748
assert not await aiofiles.os.path.exists(path)
48-
49+
50+
4951
@pytest.mark.asyncio
5052
async def test_ensure_non_empty_directory_absent(tmp_path: pathlib.Path):
5153
# Create a directory
@@ -63,7 +65,8 @@ async def test_ensure_non_empty_directory_absent(tmp_path: pathlib.Path):
6365

6466
# The directory should still exist since it was not removed
6567
assert await aiofiles.os.path.exists(path)
66-
68+
69+
6770
@pytest.mark.asyncio
6871
async def test_ensure_invalid_path(tmp_path: pathlib.Path):
6972
# Create an invalid path (e.g., a socket or a broken symlink)
@@ -92,7 +95,8 @@ async def test_ensure_absent_called_on_symlink(tmp_path: pathlib.Path):
9295

9396
# Original file should still exist
9497
assert await aiofiles.os.path.exists(path)
95-
98+
99+
96100
@pytest.mark.asyncio
97101
async def test_ensure_absent_removes_nested_empty_directory(tmp_path: pathlib.Path):
98102
# Create a nested directory structure
@@ -105,4 +109,3 @@ async def test_ensure_absent_removes_nested_empty_directory(tmp_path: pathlib.Pa
105109

106110
# Ensure parent directory still exists
107111
assert await aiofiles.os.path.exists(tmp_path / "dir1")
108-

0 commit comments

Comments
 (0)