MCPcopy Create free account
hub / github.com/dask/dask / test_parse_bytes

Function test_parse_bytes

dask/tests/test_utils.py:661–673  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

659
660
661def test_parse_bytes():
662 assert parse_bytes("100") == 100
663 assert parse_bytes("100 MB") == 100000000
664 assert parse_bytes("100M") == 100000000
665 assert parse_bytes("5kB") == 5000
666 assert parse_bytes("5.4 kB") == 5400
667 assert parse_bytes("1kiB") == 1024
668 assert parse_bytes("1Mi") == 2**20
669 assert parse_bytes("1e6") == 1000000
670 assert parse_bytes("1e6 kB") == 1000000000
671 assert parse_bytes("MB") == 1000000
672 assert parse_bytes(123) == 123
673 assert parse_bytes(".5GB") == 500000000
674
675
676def test_parse_timedelta():

Callers

nothing calls this directly

Calls 1

parse_bytesFunction · 0.90

Tested by

no test coverage detected