MCPcopy Create free account
hub / github.com/apify/crawlee-python / test_conversions

Function test_conversions

tests/unit/_utils/test_byte_size.py:19–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def test_conversions() -> None:
20 size = ByteSize.from_mb(2)
21 assert size.to_kb() == 2 * 1024
22 assert size.to_mb() == 2.0
23 assert size.to_gb() == 2 / 1024
24 assert size.to_tb() == 2 / (1024**2)
25
26
27def test_string_representation() -> None:

Callers

nothing calls this directly

Calls 5

from_mbMethod · 0.80
to_kbMethod · 0.80
to_mbMethod · 0.80
to_gbMethod · 0.80
to_tbMethod · 0.80

Tested by

no test coverage detected