rich/tests/test_control.py

13 lines
355 B
Python
Raw Normal View History

2020-05-14 19:15:31 +00:00
from rich.control import Control, strip_control_codes
def test_control():
control = Control("FOO")
assert str(control) == "FOO"
2020-05-12 10:15:59 +00:00
def test_strip_control_codes():
assert strip_control_codes("") == ""
assert strip_control_codes("foo\rbar") == "foobar"
assert strip_control_codes("Fear is the mind killer") == "Fear is the mind killer"