def test_humanize_bytes_neg() -> None: hum = stats._humanize_bytes(-10240) assert hum == "-10.0 kiB"
def test_humanize_bytes_huge() -> None: hum = stats._humanize_bytes(1 << int(60)) assert hum == "1024.0 PiB"
def test_humanize_bytes_10kb() -> None: hum = stats._humanize_bytes(10240) assert hum == "10.0 kiB"
def test_humanize_bytes_1kb() -> None: hum = stats._humanize_bytes(1 << int(10)) assert hum == "1 kiB"
def test_humanize_bytes_1() -> None: hum = stats._humanize_bytes(1) assert hum == "1 byte"
def test_humanize_bytes_none() -> None: hum = stats._humanize_bytes(0) assert hum == "no bytes"