Skip to content

Commit 2a2d0ab

Browse files
Add unit test for FormatLabel widget
1 parent ef3c045 commit 2a2d0ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_widgets.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,9 @@ def test_all_widgets_max_width(max_width, term_width) -> None:
204204
assert widget == ''
205205
else:
206206
assert widget != ''
207+
def test_format_label() -> None:
208+
bar = progressbar.ProgressBar(widgets=[
209+
progressbar.FormatLabel('Processed: %(value)d')
210+
], max_value=10)
211+
for _ in bar(range(10)):
212+
pass

0 commit comments

Comments
 (0)