Added tests to other sizes in utils module
This commit is contained in:
parent
c562a5498e
commit
760a4b930b
@ -3,8 +3,12 @@ from updater import utils
|
|||||||
|
|
||||||
@pytest.mark.parametrize("number_of_bytes, expected_result", [
|
@pytest.mark.parametrize("number_of_bytes, expected_result", [
|
||||||
(11, "11"),
|
(11, "11"),
|
||||||
|
(200000, "195.31Kb"),
|
||||||
|
(2000000, "1.91Mb"),
|
||||||
(20000000, "19.07Mb"),
|
(20000000, "19.07Mb"),
|
||||||
(2000000000, "1.86Gb"),
|
(2000000000, "1.86Gb"),
|
||||||
|
(2000000000000, "1.82Tb"),
|
||||||
|
(2000000000000000, "1.78Pb"),
|
||||||
])
|
])
|
||||||
def test_convert_bytes(number_of_bytes, expected_result):
|
def test_convert_bytes(number_of_bytes, expected_result):
|
||||||
result = utils.convert_bytes(number_of_bytes)
|
result = utils.convert_bytes(number_of_bytes)
|
||||||
|
Loading…
Reference in New Issue
Block a user