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

Function test_time_remaining_column

tests/test_progress.py:83–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82
83def test_time_remaining_column():
84 class FakeTask(Task):
85 time_remaining = 60
86
87 column = TimeRemainingColumn()
88 task = Task(1, "test", 100, 20, _get_time=lambda: 1.0)
89 text = column(task)
90 assert str(text) == "-:--:--"
91
92 text = column(FakeTask(1, "test", 100, 20, _get_time=lambda: 1.0))
93 assert str(text) == "0:01:00"
94
95
96@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

TimeRemainingColumnClass · 0.90
TaskClass · 0.90
FakeTaskClass · 0.85

Tested by

no test coverage detected