Set COLUMNS & LINES as if it was a terminal

This commit is contained in:
Abogical 2016-11-14 00:45:54 +02:00
parent 467fe38b15
commit 1362d2e90f
1 changed files with 2 additions and 0 deletions

View File

@ -904,6 +904,8 @@ def test_yes_env_output(capfd, monkeypatch):
def test_progress_percentage_sameline(capfd):
os.environ['COLUMNS'] = '4'
os.environ['LINES'] = '1'
pi = ProgressIndicatorPercent(1000, step=5, start=0, msg="%3.0f%%")
pi.logger.setLevel('INFO')
pi.show(0)