1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-20 10:28:45 +00:00
Files
supervisor/tests/host/test_info.py
Stefan Agner f6faa18409 Bump pre-commit ruff to 0.5.7 and reformat (#5242)
It seems that the codebase is not formatted with the latest ruff
version. This PR reformats the codebase with ruff 0.5.7.
2024-08-13 20:53:56 +02:00

15 lines
332 B
Python

"""Test host info."""
from unittest.mock import patch
from supervisor.host.info import InfoCenter
def test_host_free_space(coresys):
"""Test host free space."""
info = InfoCenter(coresys)
with patch("shutil.disk_usage", return_value=(42, 42, 2 * (1024.0**3))):
free = info.free_space
assert free == 2.0