File: test_progressbar.py

package info (click to toggle)
translate-toolkit 3.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,948 kB
  • sloc: python: 70,547; sh: 1,412; makefile: 186; xml: 48
file content (11 lines) | stat: -rw-r--r-- 428 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
from translate.misc import progressbar


def test_hashprogressbar() -> None:
    """Test the [###   ] progress bar."""
    bar = progressbar.HashProgressBar()
    assert str(bar) == "[                                           ]   0%"
    bar.amount = 50
    assert str(bar) == "[######################                     ]  50%"
    bar.amount = 100
    assert str(bar) == "[###########################################] 100%"