MCPcopy
hub / github.com/dask/dask / test_parse_bytes

Function test_parse_bytes

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

parse_bytesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…