From 8caee6a2e9ba6a2ae8987b1eeadb926199cf940b Mon Sep 17 00:00:00 2001 From: Isaac Wahhab Date: Sat, 3 Apr 2021 15:33:56 -0700 Subject: [PATCH] Coverage fix? --- tests/test_progress.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/test_progress.py b/tests/test_progress.py index 1769b5e1c..ca76468ea 100644 --- a/tests/test_progress.py +++ b/tests/test_progress.py @@ -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: