MCPcopy
hub / github.com/Textualize/rich / test_update

Function test_update

tests/test_bar.py:15–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def test_update():
16 bar = ProgressBar()
17 assert bar.completed == 0
18 assert bar.total == 100
19 bar.update(10, 20)
20 assert bar.completed == 10
21 assert bar.total == 20
22 assert bar.percentage_completed == 50
23 bar.update(100)
24 assert bar.percentage_completed == 100
25
26
27expected = [

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
ProgressBarClass · 0.90

Tested by

no test coverage detected