Debian Codegraph @

tests/test_flush.py

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 import time
2
•3 import progressbar2
4
5
6 def test_flush() -> None:
7 """Left justify using the terminal width"""
•8 p = progressbar2.ProgressBar(poll_interval=0.001)
9 p.print('hello')
10
11 for i in range(10):
12 print('pre-updates', p.updates)
13 p.update(i)
14 print('need update?', p._needs_update())
15 if i > 5:
16 time.sleep(0.1)
17 print('post-updates', p.updates)