tests: test TqdmConsole

This commit is contained in:
James R. Barlow
2019-12-30 17:51:09 -08:00
parent 0c0d53b10f
commit c36e9950ae
2 changed files with 70 additions and 1 deletions
+9 -1
View File
@@ -32,7 +32,15 @@ from .cli import parser
class TqdmConsole:
"""Wrapper to log messages in a way that is compatible with tqdm progress bar"""
"""Wrapper to log messages in a way that is compatible with tqdm progress bar
This routes log messages through tqdm so that it can print them above the
progress bar, and then refresh the progress bar, rather than overwriting
it which looks messy.
For some reason Python 3.6 prints extra empty messages from time to time,
so we suppress those.
"""
def __init__(self, file):
self.file = file