Debian Codegraph @

tests/unit/test_carets_utils.py

raw symbols SCIP
1 from friendly_traceback.utils import get_single_line_highlighting_ranges as get
2 from friendly_traceback.utils import create_caret_highlighted as create
3
4 def test_round_trip():
5 lines = [" ^^ ^^^ ^^", # start on space, end on ^
6 " ^^ ^^^ ^ ", # start on space, end on space
7 "^^ ^^^ ^", # start on ^, end on ^
8 "^^ ^^^ ^ ",] # start on ^, end on space
9
10 for line in lines:
11 assert line == create(get(line))