示例#1
0
def test_1024():
    assert approximate_size(1000000000000, True) == "931.3 GiB"
示例#2
0
def test_1000():
    assert approximate_size(1000000000000) == "1.0 TB"
示例#3
0
def test_4000_order():
    assert approximate_size(a_kilobyte_is_1024_bytes=False,
                            size=4000) == "4.0 KB"
示例#4
0
def test_4000():
    assert approximate_size(4000, a_kilobyte_is_1024_bytes=False) == "4.0 KB"
示例#5
0
def test_1k():
    assert approximate_size(1024) == '1.0 KB'
示例#6
0
def test_4000_case2():
    assert approximate_size(size=4000) == "4.0 KB"