You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In test_large_markdown_table_stays_single_chunk, strengthen the assertion to verify that the chunk's content is identical to the original table input, not just that it contains a specific string.
def test_large_markdown_table_stays_single_chunk(self, chunker):
"""Large Markdown tables remain as single chunk (current behavior)."""
# Generate a large table with 100 rows
header = "| Name | Age | City |\n|---|---|---|\n"
rows = "| Alice | 30 | NYC |\n" * 100
large_table = header + rows
chunks = chunker.chunk(large_table)
# Current behavior: Markdown tables are kept as single chunk
assert len(chunks) == 1
assert chunks[0]["metadata"]["chunk_type"] == "tabular"
- assert "Alice" in chunks[0]["content"]+ assert chunks[0]["content"] == large_table
Apply / Chat
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly points out a weakness in the test and proposes a stricter assertion to ensure the entire table content is preserved, which improves test robustness.
Medium
More
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
… profiles
PR Type
Tests
Description
Updated profile model tests to use flexible assertions instead of hardcoded values
Added comprehensive tests for PDF post-processing methods
Added header_levels parameter tests for DocumentChunker
Created new PyMuPDFConverter test suite for link stripping
Updated TabularChunker test to verify large table handling behavior
Diagram Walkthrough
File Walkthrough
profile-model.test.ts
Convert profile defaults to flexible assertionsapps/backend/tests/unit/models/profile-model.test.ts
checks
test_base_converter.py
Add PDF post-processing method testsapps/ai-worker/tests/test_base_converter.py
TestPostProcessPdfclass with 3 test methods for PDFpost-processing
TestPostProcessPymupdfclass with 4 test methods forPyMuPDF-specific processing
linebreak merging
test_document_chunker.py
Add header_levels parameter validation testsapps/ai-worker/tests/test_document_chunker.py
TestHeaderLevelsclass with 7 comprehensive test methodsconfigurations
test_pymupdf_converter.py
Create PyMuPDFConverter link stripping testsapps/ai-worker/tests/test_pymupdf_converter.py
TestStripHiddenLinksclasstest_tabular_chunker.py
Implement large table chunking behavior testapps/ai-worker/tests/test_tabular_chunker.py