diff options
Diffstat (limited to '')
-rw-r--r-- | tests/test_constrain.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_constrain.py b/tests/test_constrain.py new file mode 100644 index 0000000..6fc9636 --- /dev/null +++ b/tests/test_constrain.py @@ -0,0 +1,11 @@ +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 |