Files
seshat-tts/tests/test_ocr.py
T
cbartos 75fc1afa53
CI / Tests (3.10) (push) Waiting to run
CI / Tests (3.13) (push) Waiting to run
seshat-tts
2026-05-22 05:54:01 -04:00

23 lines
774 B
Python

from seshat_tts.ocr import extract_text_from_lines
def test_selected_text_does_not_skip_first_line() -> None:
lines = ["A large group of humanoids came from the foothills", "and headed north not long ago."]
assert (
extract_text_from_lines(lines)
== "A large group of humanoids came from the foothills and headed north not long ago."
)
def test_selected_text_includes_choice_marker_text_when_inside_region() -> None:
lines = ["Line to read.", "|. Continue"]
assert extract_text_from_lines(lines) == "Line to read. |. Continue"
def test_selected_text_includes_pipe_marker_without_dot_when_inside_region() -> None:
lines = ["Line to read.", "| Continue"]
assert extract_text_from_lines(lines) == "Line to read. | Continue"