unit tests

This commit is contained in:
Casper da Costa-Luis 2018-10-14 23:23:13 +01:00
parent 49cbd051a9
commit a1e2f3d001
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
1 changed files with 9 additions and 0 deletions

View File

@ -209,6 +209,15 @@ def test_format_interval():
assert format_interval(238113) == '66:08:33'
def test_format_num():
"""Test number format"""
format_num = tqdm.format_num
assert float(format_num(1337)) == 1337
assert format_num(int(1e6)) == '1e+6'
assert format_num(1239876) == '1''239''876'
def test_format_meter():
"""Test statistics and progress bar formatting"""
try: