Added tests to other sizes in utils module

This commit is contained in:
Manuel Cortez 2022-02-19 14:28:31 -06:00
parent c562a5498e
commit 760a4b930b
No known key found for this signature in database
GPG Key ID: 262CC30FA01B5CBF

View File

@ -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)