Skip to content

Commit

Permalink
improve tests cov
Browse files Browse the repository at this point in the history
  • Loading branch information
faissaloux committed Nov 26, 2023
1 parent 3dd6cb8 commit 6d3ab70
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/trim_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ def test_trim_when_text_exceeds_terminal_width(self):
terminal_width = termspark.get_terminal_width()

text = "A" * (terminal_width + 10)
termspark = termspark.print_left(text, "red")
termspark = termspark.print_left("A" * 8).print_right(text, "red")
termspark.spark()

assert len(text) > len(termspark.left["content"][0])

def test_trim_when_text_exceeds_terminal_width_on_list(self):
termspark = TermSpark()
terminal_width = termspark.get_terminal_width()

text = "A" * (terminal_width + 10)
termspark = termspark.spark_left(["A" * 8]).spark_right(
[text, "red"], [text, "blue"]
)
termspark.spark()

assert len(text) > len(termspark.left["content"][0])

0 comments on commit 6d3ab70

Please sign in to comment.