Skip to content

chore: Condensing the latex test backend into multiple files#3281

Merged
PeterStaar-IBM merged 1 commit intodocling-project:mainfrom
adityasasidhar:main
Apr 13, 2026
Merged

chore: Condensing the latex test backend into multiple files#3281
PeterStaar-IBM merged 1 commit intodocling-project:mainfrom
adityasasidhar:main

Conversation

@adityasasidhar
Copy link
Copy Markdown
Contributor

@adityasasidhar adityasasidhar commented Apr 12, 2026

Description

Resolves #3235

This PR improves the maintainability and scalability of the LaTeX testing suite by modularizing the massive tests/test_backend_latex.py file (which had grown to over 1,800 lines).

The monolithic test file has been removed and its contents systematically distributed into a dedicated tests/test_latex/ subdirectory based on the features being tested, without removing or altering the logic of any existing test logic.

Changes Made:

  • Removed tests/test_backend_latex.py.

  • Created feature-specific test modules:

    • test_basic.py (e2e, conversions, arguments, file loading)
    • test_tables.py (tabular, multirow, empty tables)
    • test_math.py (math parsing, formulas, inline/display)
    • test_lists.py (itemize, enumerate, nested lists)
    • test_figures.py (includegraphics, missing images, captions)
    • test_macros.py (text formatting, cite, fallbacks, spacing)
    • test_environments.py (abstract, verbatim, lstlisting)
  • Extracted shared dependencies, headers, and the latex_paths fixture into tests/test_latex/conftest.py for clean, native Pytest discovery.

  • Also added an inline # type: ignore in docling/backend/html_backend.py to satisfy mypy pre-commit checks locally for missing Playwright stubs.

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary. (Refactored existing tests)

Signed-off-by: Aditya Sasidhar <telikicherlaadityasasidhar@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @adityasasidhar, all your commits are properly signed off. 🎉

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 12, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@adityasasidhar
Copy link
Copy Markdown
Contributor Author

Hey @PeterStaar-IBM , Please consider this PR for the issue #3281. Apologies for creating another PR, I had to close it because my older docling fork got riddled with multiple issues, merge conflicts and branches so the faster win would have been to start clean. ( Basically too close for missiles, switching to guns case ).

@PeterStaar-IBM PeterStaar-IBM changed the title chore:Condensing the latex test backend into multiple files chore: Condensing the latex test backend into multiple files Apr 13, 2026
@PeterStaar-IBM PeterStaar-IBM self-requested a review April 13, 2026 03:52
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
docling/backend/html_backend.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@PeterStaar-IBM PeterStaar-IBM merged commit 60fc517 into docling-project:main Apr 13, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Condensing the latex test backend into multiple files

2 participants