diff --git a/tqdm_4/tqdm/_tqdm.py b/tqdm_4/tqdm/_tqdm.py index ea58409..df6414e 100755 --- a/tqdm_4/tqdm/_tqdm.py +++ b/tqdm_4/tqdm/_tqdm.py @@ -320,8 +320,7 @@ def format_meter(n, total, elapsed, ncols=None, prefix='', ascii=False, # apply custom scale if necessary if unit_scale and unit_scale not in (True, 1): - if total: - total *= unit_scale + total *= unit_scale n *= unit_scale if rate: rate *= unit_scale # by default rate = 1 / self.avg_time diff --git a/tqdm_4/tqdm/tests/tests_tqdm.py b/tqdm_4/tqdm/tests/tests_tqdm.py index f39218d..9ea573b 100644 --- a/tqdm_4/tqdm/tests/tests_tqdm.py +++ b/tqdm_4/tqdm/tests/tests_tqdm.py @@ -772,15 +772,6 @@ def test_infinite_total(): pass -@with_setup(pretest, posttest) -def test_nototal(): - """Test unknown total length""" - with closing(StringIO()) as our_file: - for i in tqdm((i for i in range(10)), file=our_file, unit_scale=10): - pass - assert "100it" in our_file.getvalue() - - @with_setup(pretest, posttest) def test_unit(): """Test SI unit prefix"""