MCPcopy
hub / github.com/Textualize/rich / test_split_cells_doubles

Function test_split_cells_doubles

tests/test_segment.py:329–335  ·  view source on GitHub ↗

Check that split cells splits on cell positions with all double width characters.

()

Source from the content-addressed store, hash-verified

327
328
329def test_split_cells_doubles() -> None:
330 """Check that split cells splits on cell positions with all double width characters."""
331 test = Segment("早" * 20)
332 for position in range(1, test.cell_length):
333 left, right = Segment.split_cells(test, position)
334 assert cell_len(left.text) == position
335 assert cell_len(right.text) == test.cell_length - position
336
337
338def test_split_cells_single() -> None:

Callers

nothing calls this directly

Calls 3

SegmentClass · 0.90
cell_lenFunction · 0.90
split_cellsMethod · 0.80

Tested by

no test coverage detected