Skip to content

Commit

Permalink
unit test, coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jul 22, 2017
1 parent 8dc997b commit b98ca19
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tqdm/tests/tests_tqdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1599,3 +1599,13 @@ def test_file_redirection():
assert res.count("Such fun\n") == 3
assert "0/3" in res
assert "3/3" in res


@with_setup(pretest, posttest)
def test_unit_scale():
"""Test numeric `unit_scale`"""
with closing(StringIO()) as our_file:
for _ in tqdm(_range(100), unit_scale=9, file=our_file):
pass
out = our_file.getvalue()
assert '900/900' in out

0 comments on commit b98ca19

Please sign in to comment.