Skip to content

Commit

Permalink
test if splitting is the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Coniferish committed Nov 26, 2024
1 parent 4c7e037 commit c65e1b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _test_unstructured_client/integration/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ async def mock_send(_, request: httpx.Request, **kwargs):
@pytest.mark.parametrize(
("filename", "chunking_strategy", "expected_elements_num"),
[
## -- Paid strategy --
# -- Paid strategy --
("_sample_docs/layout-parser-paper.pdf", "by_page", 16), # 16 pages, 133 elements w/o chunking
("_sample_docs/layout-parser-paper.pdf", shared.ChunkingStrategy.BY_PAGE, 16),
# -- Open source strategy --
Expand All @@ -503,6 +503,7 @@ def test_chunking(
parameters = shared.PartitionParameters(
files=files,
chunking_strategy=chunking_strategy, # type: ignore
split_pdf_page=False, # -- Testing splitting as potential issue
)

req = operations.PartitionRequest(
Expand All @@ -511,5 +512,5 @@ def test_chunking(

resp = client.general.partition(request=req)
assert len(resp.elements) == expected_elements_num
assert all(element.type == "CompositeElement" for element in resp.elements)
assert all(element.get("type") == "CompositeElement" for element in resp.elements)

0 comments on commit c65e1b1

Please sign in to comment.