Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jan 23, 2021
1 parent 5fa1bc4 commit c1055ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rich/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ def divide(self, offsets: Iterable[int]) -> Lines:
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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit c1055ce

Please sign in to comment.