Skip to content

Commit

Permalink
Added tests for os.statvfs() and os.path.ismount()
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevaev committed Mar 20, 2023
1 parent d692ad6 commit 4ad14b0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ async def test_stat():
assert stat_res.st_size == 10


@pytest.mark.asyncio
async def test_statvfs():
"""Test the statvfs call."""

statvfs_res = await aiofiles.os.statvfs("/")

assert statvfs_res.f_bsize == os.statvfs("/").f_bsize


@pytest.mark.asyncio
async def test_remove():
"""Test the remove call."""
Expand Down Expand Up @@ -204,6 +213,14 @@ async def test_islink():
await aiofiles.os.remove(dst_filename)


@pytest.mark.asyncio
async def test_ismount():
"""Test the path.ismount call."""
filename = join(dirname(__file__), "resources")
assert not await aiofiles.os.path.ismount(filename)
assert await aiofiles.os.path.ismount("/")


@pytest.mark.asyncio
async def test_getsize():
"""Test path.getsize call."""
Expand Down

0 comments on commit 4ad14b0

Please sign in to comment.