def test_measure_pretty(): """Test measure respects expand_all""" # https://github.com/Textualize/rich/issues/1998 console = Console() pretty = Pretty(["alpha", "beta", "delta", "gamma"], expand_all=True) measurement = console.measure(pretty) assert measurement == Measurement(12, 12)
table.caption = "Made with Rich" with beat(10): table.caption = "Made with [b]Rich[/b]" with beat(10): table.caption = "Made with [b magenta not dim]Rich[/]" for row in TABLE_DATA: with beat(10): table.add_row(*row) with beat(10): table.show_footer = True table_width = console.measure(table).maximum with beat(10): table.columns[2].justify = "right" with beat(10): table.columns[3].justify = "right" with beat(10): table.columns[4].justify = "right" with beat(10): table.columns[2].header_style = "bold red" with beat(10): table.columns[3].header_style = "bold green"