Skip to content

Commit

Permalink
Coverage fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Wahhab committed Apr 3, 2021
1 parent f9381df commit 8caee6a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,26 @@ def test_renderable_column():


def test_spinner_column():
time = 1.0

def get_time():
nonlocal time
return time

column = SpinnerColumn()
column.set_spinner("dots2")
task = Task(1, "test", 100, 20, _get_time=lambda: 1.0)
task = Task(1, "test", 100, 20, _get_time=get_time)
result = column.render(task)
print(repr(result))
expected = "⣾"
assert str(result) == expected

time += 1.0
result = column.render(task)
print(repr(result))
expected = "⡿"
assert str(result) == expected


def test_download_progress_uses_decimal_units() -> None:

Expand Down

0 comments on commit 8caee6a

Please sign in to comment.