def test_format_as_long_terabytes(): results = Utils.format_bytes(size=723 * 1024 ** 4, style='long') expected = (723.0, 'Terabytes') assert results == expected
def test_format_as_long_petabytes(): results = Utils.format_bytes(size=1024 ** 5, style='long') expected = (1.0, 'Petabytes') assert results == expected
def test_format_as_long_megabytes_2(): results = Utils.format_bytes(size=9753 * 1024, style='long') expected = (9.5244140625, 'Megabytes') assert results == expected
def test_format_as_long_gigabytes(): results = Utils.format_bytes(size=3 * 1024 ** 3, style='long') expected = (3.0, 'Gigabytes') assert results == expected
def test_format_as_long_megabytes(): results = Utils.format_bytes(size=1.5 * 1024 ** 2, style='long') expected = (1.5, 'Megabytes') assert results == expected
def test_format_as_bytes(): results = Utils.format_bytes(size=1023, style='short') expected = (1023, 'B') assert results == expected
def test_format_as_short_yottabytes(): results = Utils.format_bytes(size=1024 ** 7, style='short') expected = (1.0, 'YB') assert results == expected
def test_format_as_long_kilobytes(): results = Utils.format_bytes(size=765.4 * 1024, style='long') expected = (765.4, 'Kilobytes') assert results == expected
def test_format_as_short_terabytes(): results = Utils.format_bytes(size=723 * 1024 ** 4, style='short') expected = (723.0, 'TB') assert results == expected
def test_format_as_short_gigabytes(): results = Utils.format_bytes(size=3 * 1024 ** 3, style='short') expected = (3.0, 'GB') assert results == expected
def test_format_as_short_megabytes_2(): results = Utils.format_bytes(size=9753 * 1024, style='short') expected = (9.5244140625, 'MB') assert results == expected
def test_format_as_short_megabytes(): results = Utils.format_bytes(size=1.5 * 1024 ** 2, style='short') expected = (1.5, 'MB') assert results == expected
def test_format_as_short_kilobytes(): results = Utils.format_bytes(size=765.4 * 1024, style='short') expected = (765.4, 'KB') assert results == expected