mirror of https://github.com/Textualize/rich.git
12 lines
319 B
Python
12 lines
319 B
Python
|
from rich.console import Console
|
||
|
from rich.constrain import Constrain
|
||
|
from rich.text import Text
|
||
|
|
||
|
|
||
|
def test_width_of_none():
|
||
|
console = Console()
|
||
|
constrain = Constrain(Text("foo"), width=None)
|
||
|
min_width, max_width = constrain.__rich_measure__(console, 80)
|
||
|
assert min_width == 3
|
||
|
assert max_width == 3
|