test: add comprehensive tests for --rasterizer option

Add test_rasterizer.py with tests covering:
- Basic rasterizer option validation ('auto', 'ghostscript', 'pypdfium')
- Rasterizer + --rotate-pages interaction
- PDFs with nonstandard MediaBox/TrimBox/CropBox
- Direct hook tests verifying plugins respect the option

Also fix pluggy parameter passing: make 'options' a required parameter
(no default) in the hookspec so pluggy forwards it to implementations.
Update test plugins and test_rotation.py to pass the new parameter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
James R. Barlow
2025-12-21 12:29:17 -08:00
co-authored by Claude Opus 4.5
parent ed813cec67
commit b9f488d65c
7 changed files with 631 additions and 7 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ def rasterize_pdf_page(
rotation,
filter_vector,
stop_on_soft_error,
options=None,
options,
):
"""Rasterize a single page of a PDF file using Ghostscript."""
# Check if user explicitly requested a different rasterizer