Ejemplo n.º 1
0
    def __init__(self, num_tests: int, progress_styles: List[TestProgressStyle]):
        super().__init__(num_tests, progress_styles)

        self.spinner_column = SpinnerColumn(
            style="pass.textonly",
            finished_text=GREEN_CHECK,
        )
        self.test_description_column = RenderableColumn(Text(""))

        self.progress = Progress(
            self.spinner_column,
            self.test_description_column,
            console=rich_console,
        )

        self.task = self.progress.add_task("", total=num_tests)
Ejemplo n.º 2
0
def test_renderable_column():
    column = RenderableColumn("foo")
    task = Task(1, "test", 100, 20, _get_time=lambda: 1.0)
    assert column.render(task) == "foo"