Checking the coverage of the tests, I noticed that tqdm progress bar code is not covered, because tqdm is not included in requirements.txt. One option is to install tqdm for the tests, but then the non-tqdm code won't be covered.
So a solution probably is to do some tricks with module loading/unloading/deleting it from sys.modules to ensure that both code-paths are tested by test_printing.
Checking the coverage of the tests, I noticed that tqdm progress bar code is not covered, because tqdm is not included in requirements.txt. One option is to install tqdm for the tests, but then the non-tqdm code won't be covered. So a solution probably is to do some tricks with module loading/unloading/deleting it from sys.modules to ensure that both code-paths are tested by test_printing.