Commit 30559e45 authored by Dion Häfner's avatar Dion Häfner
Browse files

fix progress bar again

parent d91e8d94
......@@ -39,4 +39,12 @@ def test_progress_format(capsys):
prog = prog.strip()
return prog
assert sanitize(captured_log.out) == sanitize(captured_tqdm.out)
def deduplicate(prog):
# remove repeated identical lines
out = []
for line in prog.split('\n'):
if not out or out[-1] != line:
return '\n'.join(out)
assert sanitize(captured_log.out) == deduplicate(sanitize(captured_tqdm.out))
......@@ -156,6 +156,7 @@ class FancyProgressBar:
def __exit__(self, *args, **kwargs):
self._pbar.__exit__(*args, **kwargs)
def advance_time(self, amount):
self._iteration += 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment