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

Function test_using_default_columns

tests/test_progress.py:385–408  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

383
384
385def test_using_default_columns() -> None:
386 # can only check types, as the instances do not '==' each other
387 expected_default_types = [
388 TextColumn,
389 BarColumn,
390 TaskProgressColumn,
391 TimeRemainingColumn,
392 ]
393
394 progress = Progress()
395 assert [type(c) for c in progress.columns] == expected_default_types
396
397 progress = Progress(
398 SpinnerColumn(),
399 *Progress.get_default_columns(),
400 "Elapsed:",
401 TimeElapsedColumn(),
402 )
403 assert [type(c) for c in progress.columns] == [
404 SpinnerColumn,
405 *expected_default_types,
406 str,
407 TimeElapsedColumn,
408 ]
409
410
411def test_task_create() -> None:

Callers

nothing calls this directly

Calls 4

ProgressClass · 0.90
SpinnerColumnClass · 0.90
TimeElapsedColumnClass · 0.90
get_default_columnsMethod · 0.80

Tested by

no test coverage detected