File: test_helpers.py

package info (click to toggle)
python-aioasuswrt 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 168 kB
  • sloc: python: 1,283; makefile: 5
file content (9 lines) | stat: -rw-r--r-- 292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
from aioasuswrt.helpers import convert_size


def test_convert_size():
    assert "0 B" == convert_size(0)
    assert "1.0 B" == convert_size(1)
    assert "1.0 KB" == convert_size(1024)
    assert "1.0 MB" == convert_size(1024 * 1024)
    assert "1.0 GB" == convert_size(1024 * 1024 * 1024)