Skip to content

Commit 283b218

Browse files
tests/live: Simplify word-related conditionals in test_live_extract_pdf_text
- Replaced redundant string comparisons for `word_style` and `word_coordinates` options with direct truthy value checks. - Ensured consistent logic for validating `response.words`. Assisted-by: Codex
1 parent de3eb43 commit 283b218

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/live/test_live_extract_pdf_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_live_extract_pdf_text_success(
5959
assert isinstance(response, ExtractedTextDocument)
6060
assert response.input_id == uploaded.id
6161
_assert_live_full_text(response, full_text_mode=options["full_text"])
62-
if options["word_style"] == "on" or options["word_coordinates"] == "on":
62+
if options["word_style"] or options["word_coordinates"]:
6363
assert response.words is not None
6464
assert response.words
6565

@@ -82,7 +82,7 @@ async def test_live_async_extract_pdf_text_success(
8282
assert isinstance(response, ExtractedTextDocument)
8383
assert response.input_id == uploaded.id
8484
_assert_live_full_text(response, full_text_mode=options["full_text"])
85-
if options["word_style"] == "on" or options["word_coordinates"] == "on":
85+
if options["word_style"] or options["word_coordinates"]:
8686
assert response.words is not None
8787
assert response.words
8888

0 commit comments

Comments
 (0)