mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
055786a6a0
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
19 lines
578 B
Python
19 lines
578 B
Python
import unittest
|
|
from slpkg.sizes import units
|
|
|
|
|
|
class TetsUnits(unittest.TestCase):
|
|
|
|
def test_units(self):
|
|
"""Testing the units metrics
|
|
"""
|
|
self.assertCountEqual((["Kb", "Kb"], [100, 100]),
|
|
units(["100"], ["100"]))
|
|
self.assertCountEqual((["Mb", "Mb"], [1000, 1000]),
|
|
units(["1024000"], ["1024000"]))
|
|
self.assertCountEqual((["Gb", "Gb"], [976.56, 976.56]),
|
|
units(["1024000000"], ["1024000000"]))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|