Added unittest for utils module
This commit is contained in:
parent
16dd77760f
commit
dcdb3250e4
11
test/test_utils.py
Normal file
11
test/test_utils.py
Normal file
@ -0,0 +1,11 @@
|
||||
import pytest
|
||||
from updater import utils
|
||||
|
||||
@pytest.mark.parametrize("number_of_bytes, expected_result", [
|
||||
(11, "11"),
|
||||
(20000000, "19.07Mb"),
|
||||
(2000000000, "1.86Gb"),
|
||||
])
|
||||
def test_convert_bytes(number_of_bytes, expected_result):
|
||||
result = utils.convert_bytes(number_of_bytes)
|
||||
assert result == expected_result
|
Loading…
Reference in New Issue
Block a user