mirror of https://github.com/Textualize/rich.git
coverage
This commit is contained in:
parent
5fa1bc4def
commit
c1055cecda
|
@ -949,7 +949,7 @@ class Text(JupyterMixin):
|
|||
append_span(line_span)
|
||||
position -= 1
|
||||
if position < 0 or not span_stack:
|
||||
break
|
||||
break # pragma: no cover
|
||||
line._spans.sort(key=get_order)
|
||||
|
||||
return new_lines
|
||||
|
|
|
@ -307,12 +307,12 @@ def test_split():
|
|||
|
||||
|
||||
def test_split_spans():
|
||||
test = Text.from_markup("[red]Hello\nWorld")
|
||||
test = Text.from_markup("[red]Hello\n[b]World")
|
||||
lines = test.split("\n")
|
||||
assert lines[0].plain == "Hello"
|
||||
assert lines[1].plain == "World"
|
||||
assert lines[0].spans == [Span(0, 5, "red")]
|
||||
assert lines[1].spans == [Span(0, 5, "red")]
|
||||
assert lines[1].spans == [Span(0, 5, "red"), Span(0, 5, "bold")]
|
||||
|
||||
|
||||
def test_divide():
|
||||
|
|
Loading…
Reference in New Issue